You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-sizing] Production for values common to max/min/preferred widths and heights #13478
Could css-sizing-3 please introduce something like <box-length> or <box-dimension> = <length-percentage [0,∞]> | min-content | max-content | fit-content(<length-percentage [0,∞]>) | <calc-size()>?
With that production, <'width'>, <'height'>, <'min-width'>, <'min-height'> could be simplified to auto | <box-dimension>, whereas <'max-width'>, <'max-height'> could become none | <box-dimension>. This would make the difference more noticeable.
css-sizing-4 can then add stretch | fit-content | contain to it.
css-logical refers to <'width'> and <'min-width'> and <'max-width'>. Although this is the future-safe way, it feels a bit weird that the height properties also use a width value.
css-flexbox could either keep its content | <'width'> value syntax for the flex-basis property, or switch to auto | content | <box-dimension>.
Done! Thanks for the suggestion, @Crissov, this is much better. We named it <box-size>. Leaving the issue open to track edits for css-flexbox and css-multicol.
Fair – I think I did not suggest <box-size> because I believe the new size property should behave been called box-size and it would then be confusing to also have <'box-size'>.
The ec88f45 rewrite appears to have many problems. Below are the property value definitions (ignoring those from CSS Logical) before/after, with expanded <box-size> and concatenated New values.
The logical sizing properties were imported from CSS Logical 1 to CSS Sizing 3 by f2234ba, (1) but the initial value of min-block-size and max-block-sizemin-inline-size changed from 0 to auto along the way.
Originally, column-width was defined in CSS Multi-Column Layout with auto | <length [0,∞]>, and CSS Sizing extended it with some sizing keywords.
Then ec88f45 extended it with <box-size>, which produces these sizing keywords and other values like <length-percentage [0,∞]> (2) but how to interpret <percentage> for column-width is not defined. (3) I suspect that contain and <calc-size()> may also not be expected as new values for column-width.
Since <length-percentage [0,∞]> overlapped with <length [0,∞]>, 20e4b18 was intended to replace these New values with a complete Value definition: auto | <box-size>. However, (4) it did not imported the other property table definition fields from CSS Logical. This forces w3c/webref users to manually merge definitions from the two specifications.
For (4), I was going to propose these changes until I ran into (2):
New Column Sizing Values: the stretch, min-content, max-content, and fit-content values
+This specification adds the ability to use the <box-size> production in the 'column-width' property.
<pre class="propdef partial">
Name: column-width
Value: auto | <<box-size>>
+Initial: auto+Applies to: <a>block containers</a> except <a>table wrapper boxes</a>+Inherited: no+Percentages: ?
Computed value: as specified, with <<length-percentage>> values computed
Animation type: by computed value type
</pre>
Perhaps the best solution would be to revert using <box-size> to define column-width?
The logical sizing properties were imported from CSS Logical 1 to CSS Sizing 3 by f2234ba, (1) but the initial value of min-block-size and max-block-size changed from 0 to auto along the way.
This is correct. The initial value is supposed to match between properties that map to each other. (CSS Logical was written before we changed the initial value, so it matched when it was written.)
Presumably that's a typo for min-inline-size, because max sizing properties don't even accept auto. So if something says it's the initial value, it's wrong.
Activity
[css-sizing-3][css-sizing-4] Introduce <box-size> production to conso…
fantasai commentedon Sep 3, 2026
Done! Thanks for the suggestion, @Crissov, this is much better. We named it
<box-size>. Leaving the issue open to track edits for css-flexbox and css-multicol.Crissov commentedon Sep 3, 2026
Fair – I think I did not suggest
<box-size>because I believe the newsizeproperty shouldbehave been calledbox-sizeand it would then be confusing to also have<'box-size'>.fantasai commentedon Sep 3, 2026
Oh, that got named to
sizealready, see #820.cdoublev commentedon Sep 4, 2026
The ec88f45 rewrite appears to have many problems. Below are the property value definitions (ignoring those from CSS Logical) before/after, with expanded
<box-size>and concatenatedNew values.block-size,inline-size,min-block-size,min-inline-sizeheight,width,min-height,min-widthcolumn-widthmax-block-size,max-inline-sizemax-height,max-wifthNote that
calc-size()in the RHS of a production represents a function taking no argument.cdoublev commentedon Sep 30, 2026
Re-opening because a few problems remain (1-4).
The logical sizing properties were imported from CSS Logical 1 to CSS Sizing 3 by f2234ba, (1) but the initial value of
min-block-sizeandmax-block-sizemin-inline-sizechanged from0toautoalong the way.Originally,
column-widthwas defined in CSS Multi-Column Layout withauto | <length [0,∞]>, and CSS Sizing extended it with some sizing keywords.Then ec88f45 extended it with
<box-size>, which produces these sizing keywords and other values like<length-percentage [0,∞]>(2) but how to interpret<percentage>forcolumn-widthis not defined. (3) I suspect thatcontainand<calc-size()>may also not be expected as new values forcolumn-width.Since
<length-percentage [0,∞]>overlapped with<length [0,∞]>, 20e4b18 was intended to replace theseNew valueswith a completeValuedefinition:auto | <box-size>. However, (4) it did not imported the other property table definition fields from CSS Logical. This forcesw3c/webrefusers to manually merge definitions from the two specifications.For (4), I was going to propose these changes until I ran into (2):
Perhaps the best solution would be to revert using
<box-size>to definecolumn-width?cc @tidoust
fantasai commentedon Oct 8, 2026
This is correct. The initial value is supposed to match between properties that map to each other. (CSS Logical was written before we changed the initial value, so it matched when it was written.)
fantasai commentedon Oct 8, 2026
Opened #14574 for the
column-widthissue.@cdoublev Is there anything else that needs addressing here?
cdoublev commentedon Oct 8, 2026
Nope, thank you.
Loirooriol commentedon Oct 8, 2026
Presumably that's a typo for
min-inline-size, because max sizing properties don't even acceptauto. So if something says it's the initial value, it's wrong.