- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Mon, 01 Aug 2022 20:28:46 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Propagated preferred-color-scheme on SVG images`, and agreed to the following: * `RESOLVED: do what Emilio said` * ``RESOLVED: for the purposes of propagating prefers-color-scheme to the embedded page, if `color-scheme` is `normal` and there's no `color-scheme` meta tag, the propagated scheme is the preferred color-scheme of the embedder document`` <details><summary>The full IRC log of that discussion</summary> <fantasai> Subtopic: Propagated preferred-color-scheme on SVG images<br> <pdr> https://github.com/w3c/csswg-drafts/issues/7526<br> <astearns> github: https://github.com/w3c/csswg-drafts/issues/7526<br> <fantasai> emilio: Previous issue, we resolved that preferred-color-scheme on SVG images was going to depend of the color scheme of the embedder element<br> <fantasai> emilio: what we didn't define is what happened when color-scheme: normal and color scheme is unannotated<br> <fantasai> emilio: this changes behavior, because used color scheme defaults to light<br> <fantasai> emilio: no color scheme meta, and color-scheme: normal, used color scheme is light<br> <fantasai> emilio: so pages that don't annotate it, get light instead of dark<br> <fantasai> emilio: I think we need another concept that preserves the preferred color scheme of the embedding document<br> <fantasai> emilio: I think it's a relatively straightforward fix<br> <fantasai> emilio: Philip prefers not to change the behavior<br> <fantasai> emilio: I think it's nice that the color scheme would depend on ?<br> <fantasai> emilio: same for iframes<br> <fantasai> emilio: I agree that having special cases for SVG, I think we should behave the same way for iframes<br> <fantasai> TabAtkins: Assuming not security blocked, yes<br> <fantasai> emilio: So my proposal is splitting used color scheme from preferred color scheme<br> <fantasai> emilio: propagated preferred color scheme or osmething<br> <fantasai> emilio: so the default when unannotated isn't light, it's the embedder's color scheme<br> <pdr> q+<br> <astearns> ack pdr<br> <fantasai> pdr: I think it would be useful to step back and consider ?? and ??? atwo differen things<br> <fantasai> pdr: color-scheme tells the browser how the author wants, and prefers-color-scheme tells us what the OS wants<br> <emilio> color-scheme and prefers-color-scheme<br> <fantasai> pdr: the behavior here is clear, the embedder is asking for color scheme<br> <fantasai> pdr: combine them, gets complicated<br> <astearns> s/?? and ???/color-scheme and prefers-color-scheme/<br> <fantasai> pdr: reason is, you can't make color-scheme follow prefers-color-scheme by default<br> <fantasai> pdr: some websites are designed to have light scrollbars, flip it to dark, it's ugly<br> <fantasai> pdr: we can't really ignore concepts are tightly intertwined<br> <fantasai> pdr: given all the issues with SVG and iframe, adds ocmplexity that's not necessary<br> <emilio> q+<br> <fantasai> pdr: just have color-scheme be the browser's color scheme and prefers-color-scheme be the OS<br> <astearns> ack emilio<br> <TabAtkins> q+<br> <fantasai> emilio: The reason why I think prefers-color-scheme follow the embedder, otherwise it's useless in embedder and in iframe<br> <fantasai> emilio: it's not useful to know that OS prefers dark, because you don't care about OS being dark, you care about your context being dark<br> <fantasai> TabAtkins: yes<br> <fantasai> TabAtkins: if page said 'color-scheme: dark', SVG should be dark by default<br> <fantasai> TabAtkins: if they're light, this is a problem<br> <astearns> ack TabAtkins<br> <fantasai> TabAtkins: we want to fix this breaking case<br> <fantasai> emilio: regarding the point of complexity,<br> <fantasai> emilio: in Gecko you already need to have prefers-color-scheme as a key in the image tag<br> <fantasai> emilio: I think Blink has similar mechanism<br> <fantasai> emilio: in terms of complexity, in Gecko it's mostly a one-liner<br> <fantasai> emilio: I agree it can be difficult to wrap your head around it in the first place, but in terms of implementation complexity<br> <fantasai> emilio: it's simple to default to document rather than OS color scheme<br> <fantasai> pdr: If you have SVG content, and embedded, it looks different<br> <fantasai> TabAtkins: Assuming not cross-origin iframe or other security-conscious spot<br> <fantasai> TabAtkins: iframe should behave same as image<br> <fantasai> TabAtkins: should get color scheme passed through<br> <fantasai> TabAtkins: it's only in cases where we want to restrict cross-origin communication that we cut it off<br> <fantasai> TabAtkins: ....<br> <fantasai> TabAtkins: in other cases can exfiltrate, and could od something different<br> <fantasai> TabAtkins: but in all other cases, want to keep consistency between iframe and other ways of embedding SVGs<br> <fantasai> pdr: [missed]<br> <fantasai> TabAtkins: cross-origin iframes restrict in a number of ways<br> <fantasai> TabAtkins: and CSS doesn't pass much info, mainly width/height<br> <fantasai> TabAtkins: and we would like to minimize cross-origin info propagation<br> <dbaron> s/[missed]/is there precedent for developers dealing with situations where APIs work so differently in cross-origin iframes<br> <fantasai> TabAtkins: in fact we're doing more cross-origin restrictions with (new feature)<br> <fantasai> TabAtkins: because so restricted, I doubt very surprising for authors<br> <fantasai> pdr: There's SVGs in ads, and they're frequently mixed in cross-origin contexts<br> <fantasai> pdr: from user's perspective, will be difficult to tell<br> <fantasai> pdr: why not specify fully the iframe/<br> <fantasai> emilio: there's another issue on that<br> <fantasai> emilio: I talked to security folks about this, and the tldr is they didn't find anything particularly concerning to make it behave the same as SVG<br> <fantasai> emilio: It's basically depending on Chrome's security folks to take a look to make it behave consistently everywhere<br> <fantasai> emilio: use cases where exfiltration is a problem, ...<br> <fantasai> emilio: You can't tell if color-scheme is coming from OS or from page<br> <fantasai> emilio: if you're loaded in both cross-origin and original context...<br> <fantasai> emilio: doesn't seem that problematic<br> <fantasai> emilio: it's one bit that we stop passing from OS and start passing from the page<br> <fantasai> emilio: later in agenda<br> <fantasai> emilio: I'm for making all embedding contexts behave consistently in this regard<br> <fantasai> TabAtkins: I'm operating from idea that we want to lock down crossorigin communication<br> <fantasai> TabAtkins: but if one more bit is not considered a problem then ok<br> <fantasai> emilio: My point is that, we stop exposing one bit from OS and start exposing from one page<br> <bkardell_> q+<br> <fantasai> emilio: the only way for embedded page to differentiate is if it's also loaded in a different context (top-level or other)<br> <fantasai> TabAtkins: as long as we're locking down ?<br> <fantasai> TabAtkins: so long as there is zero ability to coordinate between parties<br> <fantasai> TabAtkins: then I don't care<br> <TabAtkins> s/?/cases liked fencedframe/<br> <bkardell_> q-<br> <astearns> ack bkardell_<br> <fremy> q+<br> <fantasai> astearns: Philip, have your concerns been addressed?<br> <fantasai> pdr: Would be happier if not a special case<br> <fremy> q-<br> <fantasai> pdr: Emilio's proposal is not overall bad<br> <fantasai> TabAtkins: proposal is we propagate used color scheme to all embedded contexts regardless?<br> <fantasai> emilio: This is about page with color-scheme: normal, no color scheme meta<br> <fantasai> emilio: instead of propagating used color scheme, we propagate preferred color scheme of the document<br> <fantasai> emilio: recursively<br> <fantasai> TabAtkins: that sounds good<br> <fantasai> dbaron: please summarize into IRC!<br> <fantasai> fremy: so idea is on the viewport, if you didn't specify color-scheme, you get the value that you get from the meta tag?<br> <TabAtkins> proposed resolution: when the embedding page doesn't set color-scheme (or sets it to 'normal'), we don't propagate used color-scheme to embedded pages (they continue to get the OS-derived preferences)<br> <fantasai> fremy: if you have a web page that does not specify any color scheme property, just using default, it will propagate to iframes the value that is used in the meta tag<br> <fantasai> emilio: yes, that's how used color scheme alread work<br> <fantasai> emilio: this case, if on top of that there's no meta, instead of propagating 'light', which is the default used color scheme, you propagate the preferred color scheme of the parent document<br> <fantasai> emilio: My thought is that instead of using OS preferrence, we use preference of embedding page<br> <fantasai> emilio: it's usualy OS color scheme, except when you have nested embedding<br> <fantasai> TabAtkins: Ah, so if top level sets color scheme, second level doesn't, third level gets the top-level scheme<br> <fantasai> emilio: exactly<br> <TabAtkins> proposal: if the embedding page doesn't set a color-scheme, it propagates the default color scheme to embedded pages (rather than passing its used color scheme)<br> <emilio> Proposed resolution: for the purposes of propagating prefers-color-scheme to the embedded page, if `color-scheme` is `normal` and there's no `color-scheme` meta tag, the propagated scheme is the preferred color-scheme of the embedder document<br> <TabAtkins> (this matters for A->B->C, where A sets 'color-scheme' but B doesn't. In this case, C will get A's used scheme, without B's lack of care (which'll resolve to 'light') affecting it)<br> <dholbert> TabAtkins: ("default"/"used" might be confusing/ambiguous in your wording)<br> <fremy> lgtm<br> <fantasai> fantasai: Sounds good to me, let's resolve<br> <fantasai> astearns: objections?<br> <fantasai> RESOLVED: do what Emilio said<br> <dbaron> RESOLVED: for the purposes of propagating prefers-color-scheme to the embedded page, if `color-scheme` is `normal` and there's no `color-scheme` meta tag, the propagated scheme is the preferred color-scheme of the embedder document<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7526#issuecomment-1201681959 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 1 August 2022 20:28:48 UTC