will-change-stacking-context-opacity-1

CSS will-change: 'will-change: opacity' creates a stacking context

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
If any non-initial value of a property would create a stacking context on the element, specifying that property in will-change must create a stacking context on the element.

Source

 1 <!DOCTYPE html>
 2 <html><head><meta charset="utf-8">
 3 <title>CSS will-change: 'will-change: opacity' creates a stacking context</title>
 4 <link href="https://dbaron.org/" rel="author" title="L. David Baron">
 5 <link href="http://www.mozilla.org/" rel="author" title="Mozilla">
 6 <link href="https://drafts.csswg.org/css-will-change-1/#will-change" rel="help">
 7 <link href="https://drafts.csswg.org/css-color-3/#transparency" rel="help">
 8 <link href="reference/green-square-100-by-100-ref.htm" rel="match">
 9 <meta content="If any non-initial value of a property would create a stacking context on the element, specifying that property in will-change must create a stacking context on the element." name="assert">
10 <style>
11 html, body { margin: 0; padding: 0; }
12 div { width: 100px; height: 100px }
13 #wc { will-change: opacity; background: red }
14 #child { position: absolute; top: 0; left: 0; z-index: -1; background: green }
15 </style>
16 </head><body>
17   <div id="wc">
18     <div id="child">
19     </div>
20   </div>
21 
22 </body></html>