CSS Reference
contain-intrinsic-size
サイズ封じ込め対象要素のサイズを一括指定する
contain-intrinsic-size
プロパティは、要素がサイズ封じ込めの対象となっている場合に、ブラウザがレイアウトに使用することができる包含ボックスのサイズを一括指定します。このプロパティは、contain-intrinsic-width
プロパティ、および contain-intrinsic-height
プロパティの一括指定プロパティです。
指定できる値は、none
(既定値)、auto
、<length>
データ型の値、もしくは auto
と <length>
データ型の値の組み合わせです。
最初に指定される1つ、もしくは auto
と <length>
データ型の値からなる1組の値が、contain-intrinsic-width
プロパティの値として、次に指定される1つ、もしくは auto
と <length>
データ型の値からなる1組の値が、contain-intrinsic-height
プロパティの値として使用されます。
値が1つ、もしくは auto
と <length>
データ型の値からなる1組だけ指定された場合は、contain-intrinsic-width
、contain-intrinsic-height
両方のプロパティの値として使用されます。
具体的には下記のような記述になります。
contain-intrinsic-size: none; /* contain-intrinsic-width と contain-intrinsic-height 共に 'none' */
contain-intrinsic-size: 1000px; /* contain-intrinsic-width と contain-intrinsic-height 共に '1000px' */
contain-intrinsic-size: 10rem; /* contain-intrinsic-width と contain-intrinsic-height 共に '10rem' */
contain-intrinsic-size: auto 300px; /* contain-intrinsic-width と contain-intrinsic-height 共に 'auto 300px' */
contain-intrinsic-size: auto none; /* contain-intrinsic-width が 'auto'、contain-intrinsic-height が 'none' */
contain-intrinsic-size: auto 300px auto 4rem; /* contain-intrinsic-width が 'auto 300px'、contain-intrinsic-height が 'auto 4rem' */
主要ブラウザの対応
IE11 | × |
---|---|
Edge(EdgeHTML) | × |
Edge(Chromium) | ○ |
Chrome | ○ |
Firefox | ○ |
Safari | ○ |
iOS Safari | ○ |
Android Chrome | ○ |
関連するプロパティ
用途から CSS プロパティやセレクタを探す
用途から CSS プロパティやセレクタを逆引きできます。
- 疑似クラス
-
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :is()
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- :where()
対応ブラウザから CSS プロパティやセレクタを探す
対応ブラウザから CSS プロパティやセレクタを逆引きできます。
- IE11
-
- ::after
- ::backdrop
- ::before
- ::first-letter
- ::first-line
- ::selection
- :active
- :checked
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :fullscreen
- :hover
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :placeholder-shown
- :required
- :right
- :root
- :target
- :valid
- :visited
- @charset
- @keyframes
- ID セレクタ
- attr()
- background
- background-color
- calc()
- hyphens
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Edge(EdgeHTML)
-
- ::after
- ::backdrop
- ::before
- ::first-letter
- ::first-line
- ::placeholder
- ::selection
- :active
- :checked
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :fullscreen
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :read-only
- :read-write
- :required
- :right
- :root
- :target
- :valid
- :visited
- @charset
- @keyframes
- @supports
- ID セレクタ
- attr()
- background
- background-color
- calc()
- hyphens
- minmax()
- prefers-color-scheme
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Edge(Chromium)
-
- ::after
- ::backdrop
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scope
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- clamp()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- field-sizing
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-align
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-spacing-trim
- text-wrap
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Firefox
-
- ::after
- ::backdrop
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :is()
- :lang()
- :last-child
- :last-of-type
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- :where()
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scroll-timeline
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- clamp()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-align
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-wrap
- text-wrap-mode
- text-wrap-style
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Chrome
-
- ::after
- ::backdrop
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scope
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- clamp()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- field-sizing
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-align
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-spacing-trim
- text-wrap
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Safari
-
- ::after
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scope
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-wrap
- text-wrap-mode
- text-wrap-style
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- iOS Safari
-
- ::after
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :valid
- :visited
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scope
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-wrap
- text-wrap-mode
- text-wrap-style
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ
- Android Chrome
-
- ::after
- ::backdrop
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- :active
- :any-link
- :checked
- :default
- :defined
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :has()
- :host
- :hover
- :in-range
- :indeterminate
- :invalid
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :placeholder-shown
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :state()
- :target
- :visited
- @charset
- @color-profile
- @container
- @counter-style
- @font-feature-values
- @font-palette-values
- @keyframes
- @layer
- @property
- @scope
- @start-style
- @supports
- ID セレクタ
- accent-color
- acos()
- appearance
- asin()
- atan()
- atan2()
- attr()
- background
- background-color
- calc()
- circle()
- clamp()
- color()
- color-mix()
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container
- container-name
- container-type
- cos()
- ellipse()
- exp()
- field-sizing
- font-palette
- hyphenate-character
- hyphens
- hypot()
- inset()
- log()
- max()
- min()
- minmax()
- mod()
- polygon()
- pow()
- prefers-color-scheme
- rem()
- round()
- ruby-align
- ruby-position
- scroll-behavior
- sin()
- sqrt()
- tan()
- text-spacing-trim
- text-wrap
- white-space-collapse
- クラスセレクタ
- タイプセレクタ
- ユニバーサルセレクタ
- 入れ子セレクタ
- 子セレクタ
- 子孫セレクタ
- 属性セレクタ
- 間接セレクタ
- 隣接セレクタ