Skip to content

Commit aa94f65

Browse files
authored
[css-sizing] Add calc-size to productions for width/height and min/max-width/height. (w3c#10628)
* Add calc-size to productions for width/height and min/max-width/height. This adds calc-size() support to the grammar productions for width/height and min/max-width/height, which also implies adding them to the productions for block/inline-size and min/max-block/inline-size and to flex-basis. This is part of w3c#626. * Improve linking and reorganize a little bit.
1 parent 5181b9a commit aa94f65

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

css-sizing-3/Overview.bs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ Preferred Size Properties: the 'width' and 'height' properties</h4>
368368

369369
<pre class=propdef>
370370
Name: width, height
371-
Value: auto | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr>
371+
Value: auto | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr> | <<width/calc-size()>>
372372
Initial: auto
373373
Applies to: all elements except <a>non-replaced</a> <a>inlines</a>
374374
Inherited: no
@@ -388,7 +388,7 @@ Minimum Size Properties: the 'min-width' and 'min-height' properties</h4>
388388

389389
<pre class=propdef>
390390
Name: min-width, min-height
391-
Value: auto | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr>
391+
Value: auto | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr> | <<min-width/calc-size()>>
392392
Initial: auto
393393
Applies to: all elements that accept 'width' or 'height'
394394
Inherited: no
@@ -411,7 +411,7 @@ Maximum Size Properties: the 'max-width' and 'max-height' properties</h4>
411411

412412
<pre class=propdef>
413413
Name: max-width, max-height
414-
Value: none | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr>
414+
Value: none | <<length-percentage [0,∞]>> | min-content | max-content | <nobr>fit-content(<<length-percentage [0,∞]>>)</nobr> | <<max-width/calc-size()>>
415415
Initial: none
416416
Applies to: all elements that accept 'width' or 'height'
417417
Inherited: no
@@ -517,6 +517,14 @@ Sizing Values: the <<length-percentage [0,∞]>>, ''width/auto'' | ''max-width/n
517517
exactly as for <<length-percentage>> values standing alone.
518518

519519
Negative <<length-percentage>> values are invalid.
520+
521+
<dt><dfn function lt="calc-size()">calc-size()</dfn>
522+
<dd>
523+
See <</calc-size()>>.
524+
525+
Note: The ''max-width/none'' keyword is
526+
not usable within ''max-width/calc-size()''.
527+
520528
</dl>
521529

522530
In all cases,

css-sizing-4/Overview.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ New Sizing Values: the ''stretch'', ''fit-content'', and ''contain'' keywords</h
145145
applies [=stretch-fit sizing=].
146146
</dl>
147147

148+
Note: These new values add to the set of values
149+
that the definition of <<calc-size()>>
150+
refers to as "allowed in the context".
151+
148152
<!-- Big Text: aspect-r
149153

150154
███▌ ███▌ ████▌ █████▌ ███▌ █████▌ ████▌

0 commit comments

Comments
 (0)