Skip to content

Commit 71ae5f9

Browse files
committed
[css-color-4] Restore text about non-opaque elements painting at layer 0 even when not positioned. Slightly reword surrounding text to be more readable. Fixes #3793.
1 parent 4096940 commit 71ae5f9

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

css-color-4/Overview.bs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,7 +2442,7 @@ Transparency: the 'opacity' property</h2>
24422442

24432443
Opacity can be thought of as a postprocessing operation.
24442444
Conceptually, after the element (including its descendants) is rendered into an RGBA offscreen image,
2445-
the opacity setting specifies how to blend the offscreen rendering into
2445+
the opacity setting specifies how to blend the offscreen rendering into
24462446
the current composite rendering.
24472447
See <a href="#alpha">simple alpha compositing</a> for details.
24482448

@@ -2473,17 +2473,22 @@ Transparency: the 'opacity' property</h2>
24732473
an opaque child occluding part of the element's background will continue to do so even when 'opacity' is less than 1,
24742474
but the element and child as a whole will show the underlying page through themselves.
24752475

2476-
If 'opacity' has a value less than 1,
2477-
the element forms a <a>stacking context</a>
2478-
for its children.
2479-
This means that any content outside of it cannot be layered in z-order between pieces of content inside of it,
2480-
and vice versa.
2481-
If the element is in a context where the 'z-index' property applies,
2482-
the ''z-index/auto'' value is treated as ''0'' for the element.
2476+
If a box has 'opacity' less than 1,
2477+
it forms a <a>stacking context</a> for its children.
2478+
(This prevents its contents from interleaving in the z-axis
2479+
with content outside it.)
2480+
2481+
Furthermore, if the 'z-index' property applies to the box,
2482+
the ''z-index/auto'' value is treated as ''0'' for the element;
2483+
it is otherwise painted on the same layer within its parent stacking context
2484+
as positioned elements with stack level 0
2485+
(as if it were a positioned element with ''z-index:0'').
2486+
24832487
See <a href="https://www.w3.org/TR/CSS21/visuren.html#layers">section 9.9</a>
24842488
and <a href="https://www.w3.org/TR/CSS21/zindex.html">Appendix E</a> of [[!CSS21]]
24852489
for more information on stacking contexts.
2486-
The rules in this paragraph do not apply to SVG elements,
2490+
2491+
These rules about z-order do not apply to SVG elements,
24872492
since SVG has its own <a href="https://www.w3.org/TR/SVG11/render.html">rendering model</a> ([[!SVG11]], Chapter 3).
24882493

24892494

0 commit comments

Comments
 (0)