Skip to content

Commit df5937d

Browse files
committed
[css-grid][css-flexbox] Clarify that z-index on flex items and grid items behaves exactly as if position were relative because this apparently needs clarification. Fixes w3c#1312
1 parent 9ded38b commit df5937d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

css-flexbox/Overview.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,8 @@ Flex Item Z-Ordering</h3>
741741
except that 'order'-modified document order is used in place of raw document order,
742742
and 'z-index'
743743
values other than ''z-index/auto'' create a stacking context
744-
even if 'position' is ''static''.
744+
even if 'position' is ''static''
745+
(behaving exactly as if 'position' were ''relative'').
745746

746747
Note: Descendants that are positioned outside a flex item still participate
747748
in any stacking context established by the flex item.

css-grid/Overview.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,8 @@ Z-axis Ordering: the 'z-index' property</h3>
11751175
or even when positioned in non-intersecting areas because of negative margins or positioning.
11761176
The painting order of <a>grid items</a> is exactly the same as inline blocks [[CSS21]],
11771177
except that <a>order-modified document order</a> is used in place of raw document order,
1178-
and 'z-index' values other than <a value for=z-index>auto</a> create a stacking context even if 'position' is ''static''.
1178+
and 'z-index' values other than <a value for=z-index>auto</a> create a stacking context even if 'position' is ''static''
1179+
(behaving exactly as if 'position' were ''relative'').
11791180
Thus the 'z-index' property can easily be used to control the z-axis order of grid items.
11801181

11811182
<p class='note'>

0 commit comments

Comments
 (0)