Skip to content

Commit 0db00e1

Browse files
committed
[css-grid-1][css-flexbox-1] Per #4065, rephrase the grid/flex blockification rules in terms of explicit 'display' values rather than box-tree results.
1 parent 17c7111 commit 0db00e1

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

css-flexbox-1/Overview.bs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,18 @@ Flex Items</h2>
674674
Note: Authors reading this spec may want to
675675
<a href="#item-margins">skip past the following box-generation and static position details</a>.
676676

677-
The 'display' value of a <a>flex item</a> is <a>blockified</a>:
678-
if the specified 'display' of an in-flow child of an element generating a <a>flex container</a>
679-
is an inline-level value, it computes to its block-level equivalent.
677+
If the [=computed value|computed=] 'display' value of an element's nearest ancestor element
678+
(skipping ''display:contents'' ancestors)
679+
is ''flex'' or ''inline-flex'',
680+
the element's own 'display' value is [=blockified=].
680681
(See <a href="https://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS2.1&sect;9.7</a> [[!CSS21]]
681-
and <a href="https://www.w3.org/TR/css-display/#transformations">CSS Display</a> [[!CSS3-DISPLAY]]
682+
and [[css-display-3#transformations]]
682683
for details on this type of 'display' value conversion.)
683684

685+
Note: Blockification still occurs even when the ''flex'' or ''inline-flex'' element does not end up generating a [=flex container=] box,
686+
e.g. when it is [=replaced element|replaced=]
687+
or in a ''display: none'' subtree.
688+
684689
Note: Some values of 'display' normally trigger the creation of anonymous boxes around the original box.
685690
If such a box is a <a>flex item</a>,
686691
it is blockified first,

css-grid-1/Overview.bs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,13 +1061,18 @@ Grid Items</h2>
10611061
they participate in their container's <a>grid formatting context</a>,
10621062
not in a block formatting context.
10631063

1064-
The 'display' value of a <a>grid item</a> is <a>blockified</a>:
1065-
if the specified 'display' of an in-flow child of an element generating a <a>grid container</a>
1066-
is an inline-level value, it computes to its block-level equivalent.
1064+
If the [=computed value|computed=] 'display' value of an element's nearest ancestor element
1065+
(skipping ''display:contents'' ancestors)
1066+
is ''grid'' or ''inline-grid'',
1067+
the element's own 'display' value is [=blockified=].
10671068
(See <a href="https://www.w3.org/TR/CSS2/visuren.html#dis-pos-flo">CSS2.1&sect;9.7</a> [[!CSS21]]
1068-
and <a href="https://www.w3.org/TR/css-display/#transformations">CSS Display</a> [[!CSS3-DISPLAY]]
1069+
and [[css-display-3#transformations]]
10691070
for details on this type of 'display' value conversion.)
10701071

1072+
Note: Blockification still occurs even when the ''grid'' or ''inline-grid'' element does not end up generating a [=grid container=] box,
1073+
e.g. when it is [=replaced element|replaced=]
1074+
or in a ''display: none'' subtree.
1075+
10711076
Note: Some values of 'display' normally trigger the creation of anonymous boxes around the original box.
10721077
If such a box is a <a>grid item</a>,
10731078
it is blockified first,
@@ -1899,7 +1904,7 @@ Resolved Value of a Track Listing</h4>
18991904
The 'grid-template-rows' and 'grid-template-columns' properties are
19001905
<a>resolved value special case properties</a>. [[!CSSOM]]
19011906

1902-
When an element generates a [=grid container box=],
1907+
When an element generates a [=grid container=] box,
19031908
the <a href="https://www.w3.org/TR/cssom/#resolved-values">resolved value</a>
19041909
of the 'grid-template-rows' and 'grid-template-columns' properties is the <a>used value</a>,
19051910
serialized with:

0 commit comments

Comments
 (0)