CSS contain-intrinsic-width Property

❮ Previous Reference Next ❯

Example

.container {
  border: 2px solid green;
  width: 120px;
  content-visibility: visible;
  contain-intrinsic-height: 40px;
  contain-intrinsic-width: 130px;
}
.child {
  border: 1px solid red;
  background: blue;
  height: 50px;
  width: 150px;
}

Meaning:

The contain-intrinsic-width CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment.

Default value:none
Inherited:No
Animatable:No
Version:CSS3
JavaScript syntax:
object.style.containIntrinsicWidth="none|length|auto length|initial|inherit|revert|revert-layer|unset";



Standard Syntax

contain-intrinsic-width: none|length|auto length|initial|inherit|revert|revert-layer|unset;



Browser Support




Status







Property Values

The following table describes the values of this property:

Value Description
none The element has no intrinsic width.
length The element has the specified width (length).
auto length A remembered value of the "normally rendered" element width if one exists and the element is skipping its contents (for example, when it is offscreen); otherwise the specified length.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.



Default CSS Property Values

selectors {
  contain-intrinsic-width: none;
}
❮ Previous Reference Next ❯