Skip to content

Commit a5a01b0

Browse files
committed
[css-transforms-1] Simplify how transforms interact with propagation of backgrounds to the root element.
* State that transforms do not transform backgrounds that are propagated to the canvas. * Make other rules about interaction with background propagation apply equally to backgrounds propagated from the root or from the body. Fixes w3c#6683.
1 parent 328ddb3 commit a5a01b0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

css-transforms-1/Overview.bs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,16 @@ versus
359359
</code></pre>
360360
</div>
361361

362-
<a href="https://www.w3.org/TR/css-backgrounds-3/#valdef-background-attachment-fixed">Fixed backgrounds</a> on the root element are affected by any transform specified for that element. For all other elements that are effected by a transform (i.e. have a transform applied to them, or to any of their ancestor elements), a value of ''fixed'' for the 'background-attachment' property is treated as if it had a value of ''background-attachment/scroll''. The computed value of 'background-attachment' is not affected.
363-
364-
Note: If the root element is transformed, the transformation applies to the entire canvas, including any background specified for the root element. Since <a href="https://www.w3.org/TR/css-backgrounds-3/#special-backgrounds">the background painting area for the root element</a> is the entire canvas, which is infinite, the transformation might cause parts of the background that were originally off-screen to appear. For example, if the root element's background were repeating dots, and a transformation of ''scale(0.5)'' were specified on the root element, the dots would shrink to half their size, but there will be four times as many, so they still cover the whole viewport.
362+
When the background of an element is propagated to the canvas
363+
(see [[css-backgrounds-3#root-background]] and [[css-backgrounds-3#body-background]]),
364+
that background is not affected by any transform specified for that element or for the root element.
365365

366+
For elements that are effected by a transform
367+
(i.e. have a transform applied to them, or to any of their ancestor elements)
368+
and do not have their background propagated to the canvas,
369+
a value of ''fixed'' for the 'background-attachment' property
370+
is treated as if it had a value of ''background-attachment/scroll''.
371+
The computed value of 'background-attachment' is not affected.
366372

367373
The 'transform' Property {#transform-property}
368374
==============================================
@@ -1448,6 +1454,7 @@ At this point there are no information about potential privacy or security conce
14481454
* Relax syntax of <a element-attr for>transform</a> attribute: Do not require commas between <<transform-list>> items.
14491455
* Simplified grammar of transform functions. (No normative impact.)
14501456
* Remove animation support of 'transform' from <a element>animate</a> and <a element>set</a> elements.
1457+
* State that transforms do not transform backgrounds that are propagated to the canvas, and clarify some other interactions with background propagation.
14511458
* Editorial changes.
14521459

14531460
<h3 class="no-num" id="WD20181130">Since the <a href="https://www.w3.org/TR/2018/WD-css-transforms-1-20181130/">30 November 2018 Working Draft</a></h3>

0 commit comments

Comments
 (0)