Re: [csswg-drafts] Are the rules for interactions of transforms and backgrounds on the root element what we want? (#6683)

The CSS Working Group just discussed `Transforms and backgrounds on root element`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Transforms and backgrounds on root element<br>
&lt;fantasai> github:<br>
&lt;fantasai> 6.<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/6683<br>
&lt;fantasai> s/6.//<br>
&lt;fantasai> dbaron: obscure passage in the spec, wrote a test for it, and ended up wondering if we really want spec to say this in the first place<br>
&lt;fantasai> dbaron: [quote spec]<br>
&lt;fantasai> dbaron: basically, this is describing a special behavior for fixed backgrounds on root element, saying that transforms apply to that fixed background<br>
&lt;fantasai> dbaron: interesting because normal rules for background on root element say that backgrounds get propagated to canvas<br>
&lt;fantasai> dbaron: and backgrounds on canvas, nothing says anywhere that they are affected by transforms<br>
&lt;fantasai> dbaron: so if you read between lines in spec, I think what it says is that non-fixed background are not affected by transforms<br>
&lt;fantasai> dbaron: could probably make other arguments, though<br>
&lt;fantasai> dbaron: What I think the spec is saying is that fixed backgrounds are affected by transforms, and scrolled backgrounds are not affected by transforms<br>
&lt;fantasai> dbaron: what my tests found, is that in chromium do the exact opposite<br>
&lt;fantasai> dbaron: i.e. fixed background not affected, but scrolled backgrounds are<br>
&lt;fantasai> dbaron: in Gecko neither is affected by transform<br>
&lt;fantasai> dbaron: and in WebKit both kinds are affected by transform<br>
&lt;fantasai> dbaron: So 4 possible behaviors<br>
&lt;fantasai> dbaron: and every browser fits into a different possible behavior<br>
&lt;dholbert> as a see-also, we have https://bugzilla.mozilla.org/show_bug.cgi?id=1724471 filed on some WPT tests failing due to Gecko's behavior here<br>
&lt;fantasai> dbaron: It's not clear to me we want what the spec says<br>
&lt;fantasai> dbaron: I wanted to see if anyone has an opinion here<br>
&lt;fantasai> smfr: Don't have a clear memory about why spec is the way it is, might have been ease of implementation<br>
&lt;fantasai> smfr: we do special thinks for fixed backgrounds<br>
&lt;fantasai> smfr: but I would expect that it would have been easiest to *not* apply transforms for fiexd backgrounds<br>
&lt;fantasai> smfr: so I'm pretty confused<br>
&lt;astearns> ack RRSAgent<br>
&lt;astearns> ack r12a<br>
&lt;fantasai> dholbert: [...]<br>
&lt;fantasai> fantasai: So what do authors expect to happen here?<br>
&lt;fantasai> dbaron: part of what I was wondering<br>
&lt;fantasai> fantasai: so canvas is infinite...<br>
&lt;fantasai> smfr: Think about rotate(45deg); does the background rotate?<br>
&lt;fantasai> dbaron: Unsure anyone cares here, so maybe do the easy thing?<br>
&lt;fantasai> dbaron: so not apply transform<br>
&lt;fantasai> smfr: So if author wanted background to move around, they could put it on body and prevent propagation with different style on the root<br>
&lt;fantasai> smfr: and then transform the body<br>
&lt;fantasai> dbaron: might not cover the same area though<br>
&lt;fantasai> smfr: What happens to gaps revealed by e.g. rotating 45deg?<br>
&lt;fantasai> smfr: are they filled, or ...?<br>
&lt;fantasai> dbaron: WebKit has some bugs around that<br>
&lt;fantasai> astearns: Anyone looked to see if any bugs filed against engines on this?<br>
&lt;fantasai> smfr: don't recall any for WebKit<br>
&lt;fantasai> dbaron: I feel like this is a combination that nobody actually cares about<br>
&lt;fantasai> astearns: so suggestion of never honoring transform, is that ok smfr?<br>
&lt;fantasai> smfr: My concern there is, naively, if root gets transformed, whether background is transformed with it depends on details of impl<br>
&lt;fantasai> smfr: if we end up with behavior change, might force us to do additional work to handle<br>
&lt;fantasai> smfr: I'm OK resolving bg never gets transformed, and if hard, we can revisit<br>
&lt;fantasai> astearns: so chrome would need to change also<br>
&lt;fantasai> dbaron: haven't looked into what's needed for that, but I'm OK looking into it<br>
&lt;fantasai> astearns: proposed that we change spec to say that background on root element are not affected by transforms<br>
&lt;fantasai> dbaron: I think current spec is unclear about scrolled backgrounds<br>
&lt;fantasai> dbaron: you have to infer based on propagation rules<br>
&lt;fantasai> smfr: we've talked about effects of filters on root element in the past<br>
&lt;fantasai> smfr: Chris came up with a proposal for rendering model that allows filters to affect root background<br>
&lt;fantasai> smfr: so maybe review that and see if any of it applies to transforms<br>
&lt;fantasai> dbaron: ok, so let's come back to this later<br>
&lt;fantasai> astearns: so let's review filters and come back to this later<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6683#issuecomment-971814569 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 17 November 2021 17:48:56 UTC