{{CSSRef}}
Summary
The <flex>
CSS data type denotes a flexible length within a grid container, which is declared as dimension with the unit fr
.
Examples
1fr /* Using an integer value */ 2.5fr /* Using a float value */
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName("CSS Grid", "#typedef-flex", "<flex>")}} | {{Spec2("CSS Grid")}} | Initial definition |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | {{CompatNo}}[1] | {{CompatEdge("12.10240")}} | {{CompatNo}}[2] | {{CompatIE("10.0")}} | {{CompatNo}}[1] | {{CompatNightly("Safari")}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatNo}}[2] | {{CompatIE("10.0")}} | {{CompatNo}} | {{CompatNo}} |
[1] Implemented behind the experimental Web Platform features flag in chrome://flags
since Chrome 29.0 and Opera 28.0.
[2] Implemented behind the preference layout.css.grid.enabled
, defaulting to false
.