Re: [csswg-drafts] [mediaqueries-5] UA guidance on light vs no-preference (#3857)

The CSS Working Group just discussed `prefer-color-scheme`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: prefer-color-scheme<br>
&lt;Rossen_> github: https://github.com/w3c/csswg-drafts/issues/3857<br>
&lt;fantasai> TabAtkins: To start, the prefers-color-scheme, being one of the prefers- family of MQs<br>
&lt;fantasai> TabAtkins: Is supposed to have a 'no-preference' value, which means website can do whatever it wants<br>
&lt;fantasai> TabAtkins: We thought it'd be useful to have a 'light' value which means "give me bright color schemes, maybe I'm in a bright environment or something"<br>
&lt;fantasai> TabAtkins: and "dark" means "please don't blast me with light colors right now"<br>
&lt;fantasai> TabAtkins: The OSes with only a binary choices, i.e. Mac and Android<br>
&lt;fantasai> TabAtkins: I don't know what our non-dark value will map to<br>
&lt;fantasai> TabAtkins: but Apple maps 'dark' to 'dark'<br>
&lt;fantasai> TabAtkins: and the other value to 'light'<br>
&lt;fantasai> TabAtkins: I strongly disagree with this, because it doesn't match the intention in creating these values<br>
&lt;fantasai> TabAtkins: But if they insist on doing that<br>
&lt;fantasai> TabAtkins: we have a new proposal to do that<br>
&lt;fantasai> TabAtkins: light is supposed to actively be light<br>
&lt;fantasai> TabAtkins: So proposal is to add another value called "bright"<br>
&lt;fantasai> TabAtkins: and light will be the default and will mean "do whatever you want"<br>
&lt;fantasai> TabAtkins: which will mostly be light on the Web<br>
&lt;fantasai> TabAtkins: This is what we're going to d if nobody changes their minds from yesterday<br>
&lt;fantasai> TabAtkins: MSFT will map their three values to three values<br>
&lt;fantasai> TabAtkins: So we need to provide three values<br>
&lt;fantasai> TabAtkins: If Apple insists on treating 'light' and 'no-preference' as equivalent, then we'll need to make 'light' mena no-preference and add a new value for bright<br>
&lt;fantasai> TabAtkins: I will not write a spec if implementations are diverging in a way that doesn't do something useful for authors<br>
&lt;fantasai> emilio: I don't see an issue with issues biasing towards bright mode in Macs<br>
&lt;fantasai> AmeliaBR: The other option is Safari just doesn't offer one of those three options<br>
&lt;fantasai> AmeliaBR: Fact that Safari doesn't offer users user preference of "let the website do whatever it wants"<br>
&lt;heycam> fantasai: that means authors will treat light as no preference<br>
&lt;jensimmons> q+<br>
&lt;fantasai> AmeliaBR: If a website had a light mode and a dark mode, but for branding preferred dark mode, would you expect them to get the light version or the dark version when visiting in light mode<br>
&lt;fantasai> hober:  I don't understand<br>
&lt;fantasai> AmeliaBR: As a website designer I made two variants, light mode and dark mode. I don't like the dark mode design, but if user really wants it I'll provide it<br>
&lt;fantasai> AmeliaBR: So in dark mode I'll show dark mode<br>
&lt;fantasai> AmeliaBR: of course<br>
&lt;fantasai> AmeliaBR: But in light mode, which do you expect?<br>
&lt;fantasai> hober: website does whatever it wants<br>
&lt;fantasai> hober: Website doesn't have to respond or can respond whatever<br>
&lt;bkardell_> q+<br>
&lt;fantasai> fremy: Yeah, but the point is that the website should interpret options in an interoperable way across OSes<br>
&lt;fantasai> jensimmons: I think there's less disagreement than we realize<br>
&lt;fremy> fremy: otherwise authors will need to do (prefers: light) and (os: windows) and that's sad<br>
&lt;fantasai> jensimmons: Seems like we really only want two designs in most cases<br>
&lt;fantasai> jensimmons: and the designer just chooses in no-pref<br>
&lt;fantasai> jensimmons: but there are three choices<br>
&lt;fantasai> jensimmons: and the designer could create three designs<br>
&lt;Rossen_> q?<br>
&lt;Rossen_> ack jensimmons<br>
&lt;jensimmons> jensimmons: ...<br>
&lt;jensimmons> jensimmons: I think we're going to creat ea situation that's chaotic for authors and it will be hard to teach<br>
&lt;jensimmons> jensimmons: I think maybe there shouldn't be a no-pref MQ<br>
&lt;jensimmons> jensimmons: but have MQ for light and for dark<br>
&lt;jensimmons> jensimmons: and some other tool like a meta viewport that's like a toggle<br>
&lt;jensimmons> jensimmons: so that site can say that "in the no-preference state, we prefer dark"<br>
&lt;jensimmons> TabAtkins: I think there's some confusion<br>
&lt;astearns> s/.../the current expectation we have for authors about the tri-state query won't actually happen with real authors/<br>
&lt;jensimmons> TabAtkins: no-preference is intended to be state of Web today<br>
&lt;jensimmons> TabAtkins: If the user doesn't care, I would like to be X<br>
&lt;jensimmons> TabAtkins: But that still means that on Safari or on Android, depending on how "not dark " s interpreted<br>
&lt;jensimmons> TabAtkins: The page will be told "be light" or "be light" instead of "be your best"<br>
&lt;jensimmons> TabAtkins: The preference isn't for the page to not have a preference, it's for the user to express they don't have a preference<br>
&lt;jensimmons> dbaron: I think in the model that Tab had in mind earlier<br>
&lt;hober> hober: i think that sounds great, jen<br>
&lt;jensimmons> dbaron: it still had the same goal that you had<br>
&lt;jensimmons> dbaron: It was just targetting in a different way<br>
&lt;jensimmons> dbaron: with the model Tab had in the spec, if the site wanted to handle the no-preference case by being dark<br>
&lt;jensimmons> dbaron: then the site would write MQ only against light<br>
&lt;jensimmons> dbaron: so they would write (user wants light) or not (user wants light)<br>
&lt;jensimmons> dbaron: latter case would capture both dark and no-preference<br>
&lt;jensimmons> This is how MQs generally work<br>
&lt;jensimmons> dbaron: If the site's natural preference was light, they would write their MQ as "use rhas pref for dark" and "user doesn't have a preference for dark"<br>
&lt;jensimmons> dbaron: This is how Tab's proposal would be used<br>
&lt;tantek> fantasai: I hate meta tags for styling<br>
&lt;fantasai> fantasai: ...<br>
&lt;astearns> q?<br>
&lt;fantasai> fantasai: Important to note that MQ with no-pref value is an established MQ pattern<br>
&lt;tantek> q?<br>
&lt;fantasai> bkardell_: Since the Web until now has not had ability to preference, then current state is no-pref<br>
&lt;fantasai> bkardell_: Why do you need a preference<br>
&lt;fantasai> bkardell_: someone can actively choose one or the other<br>
&lt;fantasai> bkardell_: but some default will happen<br>
&lt;fantasai> AmeliaBR: But doesn't have to propagate to the website<br>
&lt;fantasai> Rossen_: Might be light sometimes / some apps or dark sometimes / some apps<br>
&lt;Rossen_> Zakim, close queue<br>
&lt;Zakim> ok, Rossen_, the speaker queue is closed<br>
&lt;Rossen_> q?<br>
&lt;fantasai> TabAtkins: We have to propagate no-pref to the website<br>
&lt;Rossen_> ack bkardell_<br>
&lt;fantasai> astearns: That's not something authors should do<br>
&lt;fantasai> TabAtkins: If not caring about the preference at all<br>
&lt;fantasai> astearns: i.e. MQ that hits on no-pref<br>
&lt;fantasai> TabAtkins: which is today's world<br>
&lt;fantasai> bkardell_: Do you you need a MQ that says "don't do anything special"<br>
&lt;fantasai> jensimmons: I think we all want the same thing but disagreeing how to get there<br>
&lt;fantasai> jensimmons: There's going to be a lot of code that's not in an MQ<br>
&lt;fantasai> jensimmons: that will apply in both light and dark modes and in no-pref state as well<br>
&lt;fantasai> Rossen_: I have my preferences for the last 20 yrs, they have been dark bc that's what my page looks like<br>
&lt;fantasai> Rossen_: but now my users might want light<br>
&lt;fantasai> Rossen_: I want my page to be dark generally, but if they *really* want light I will provide it<br>
&lt;fantasai> Rossen_: So I'm only going to respond to (light)<br>
&lt;fantasai> Rossen_: On the other side, I might have the opposite<br>
&lt;fantasai> Rossen_: e.g. ebay<br>
&lt;fantasai> Rossen_: always light, never cared about anything else that light<br>
&lt;fantasai> Rossen_: now I know that some ppl might care about dark<br>
&lt;fantasai> Rossen_: I don't care about adjusting for anyone else, because light is fine<br>
&lt;fantasai> Rossen_: but if user really wants dark, then I'll provide dark<br>
&lt;fantasai> TabAtkins: Suppose you have a phone<br>
&lt;fantasai> TabAtkins: Has prefs<br>
&lt;fantasai> TabAtkins: for dark mode<br>
&lt;fantasai> TabAtkins: I expect well-behaved websites to be dark<br>
&lt;fantasai> TabAtkins: If you flip on dark mode on the phone, and you visit a website on your phone<br>
&lt;fantasai> TabAtkins: do you expect the website to respond to dark?<br>
&lt;fantasai> jensimmons: I expect that if the site designed a dark-mode, it will provide that dark mode<br>
&lt;fantasai> jensimmons: which could be a range of different types of experiences<br>
&lt;fantasai> TabAtkins: If you flip dark mode on, you expect the page to do a "dark thing"<br>
&lt;fantasai> TabAtkins: If dark mode is *not* turned on, do you expect them to all be light?<br>
&lt;fantasai> TabAtkins: So you expect that if you're not in dark mode currently, websites will be mostly liight<br>
&lt;fantasai> jensimmons: I expect users to see the Web as it currently exists<br>
&lt;fantasai> TabAtkins: If the dark mode preference is on, pages will be reasonably consistently dark<br>
&lt;AmeliaBR> q?<br>
&lt;fantasai> TabAtkins: but in light mode, you expect it to be as things are today, mostly light but some dark<br>
&lt;fantasai> jensimmons: There are two conversations here. One is what designers "should" do<br>
&lt;heycam> q+<br>
&lt;fantasai> TabAtkins: My question is about if you have a binary toggle, what do you expect the web to look like?<br>
&lt;fantasai> jensimmons: Your'e advocating for websites to have three designs<br>
&lt;fantasai> dbaron: Tab isn't advocating that<br>
&lt;fantasai> hober: He's giving them a knob to do that<br>
&lt;fantasai> jensimmons: But you're advocating to force things?<br>
&lt;fantasai> TabAtkins: I'm not<br>
&lt;fantasai> TabAtkins: I'm asking what you're expecting pages to look like<br>
&lt;fantasai> dbaron: Just because you can write an MQ for 'width' for 400px, 401px, 403px, etc.<br>
&lt;fantasai> dbaron: We're not advocating a website have a design for each of those things<br>
&lt;fantasai> dbaron: We're advoctaing that the website have design for some pieces of the continuum, and others for other pieces of the continuum<br>
&lt;fantasai> dbaron: Tab is advocating that a website have designs for different pieces of this three-part continuum<br>
&lt;fantasai> jensimmons: So youre' saying, when a site has intentionally dark "ok whatever"<br>
&lt;fantasai> jensimmons: and if site has intentionally light "ok whatever"<br>
&lt;fantasai> TabAtkins: ?????<br>
&lt;fantasai> jensimmons: If our intention is for authors in the authors to have two designs<br>
&lt;fantasai> jensimmons: I don't understand what's wrong with<br>
&lt;fantasai> jensimmons: design what's going to show up in light mode and what's showing up in dark mode<br>
&lt;fantasai> jensimmons: ...<br>
&lt;fantasai> Rossen_: Tab's point is that when I switch my phone away from dark mode<br>
&lt;fantasai> Rossen_: consider page like Mercedes, which is currently dark that's their preference<br>
&lt;dbaron> s/Tab is advocating that a website have designs for different pieces of/Tab is advocating that a website have two designs for/<br>
&lt;fantasai> Rossen_: Should that page switch to a light mode theme<br>
&lt;fantasai> jensimmons: Does Mercedes make that decision?<br>
&lt;fantasai> Rossen_: Yes. We're not forcing any colors.<br>
&lt;tantek> I'm going share these here just for the record, Firefox has at least "Default, Light, Dark" themes today by default: https://support.mozilla.org/en-US/kb/use-themes-change-look-of-firefox<br>
&lt;tantek> we intended to communicate this "by default" in prefers-color-scheme: https://bugzilla.mozilla.org/show_bug.cgi?id=1529323<br>
&lt;tantek> users can install many more themes: https://support.mozilla.org/en-US/kb/use-themes-change-look-of-firefox#w_how-to-switch-themes_2<br>
&lt;tantek> er I mean top of that page: https://support.mozilla.org/en-US/kb/use-themes-change-look-of-firefox<br>
&lt;fantasai> dbaron: We've had 2-3 discussions going on here<br>
&lt;tantek> as a real world example of a site that has intentionally designed many themes, some lighter, some darker than the default: https://adactio.com/<br>
&lt;fantasai> dbaron: I had a proposal related to what I think the discussion between Tab and Tess was<br>
&lt;Rossen_> ack dbaron<br>
&lt;fantasai> dbaron: which is that maybe three states in this continuum isn't enough. Maybe we want 5 states<br>
&lt;fantasai> dbaron: In that there is a strong preference for light, a weak preference for light that is more defaulty, no preference, weak preference for dark, or strong preference for dark<br>
&lt;jensimmons> q+<br>
&lt;fantasai> dbaron: But it might be the way to represent that some OSes have two states and others have three state<br>
&lt;fantasai> dbaron: is more states<br>
&lt;fantasai> dbaron: because the continuum is different<br>
&lt;fantasai> q+<br>
&lt;tantek> +1 dbaron, this is why we're arguing. the lines of the different states don't line-up across interpretations<br>
&lt;fantasai> dbaron: One thing I'm thinking is that you have a larger continuum<br>
&lt;fantasai> dbaron: and authors will put a breakpoint on one point in that continuum<br>
&lt;fantasai> dbaron: but put on breakpoints different points in the continuum<br>
&lt;jensimmons> We have to figure this out. We can’t punt and not do it.<br>
&lt;fremy> fantasai: the problem is that many options will be confusing<br>
&lt;jensimmons> Browsers have already shipped support. So have OSes.<br>
&lt;fremy> fantasai: theoritically it works, but it seems suboptimal<br>
&lt;fremy> fantasai: also, no preference by the user should then mean light, because that's the normal human preference<br>
&lt;jensimmons> I like what David said about 5 options…. yes, that’s likely the reality of whatever…. but it doesn’t matter. Our job is not to represent in code the range of design considerations. Our job is to provide a direct connection between Authors and OS/browser settings.<br>
&lt;fremy> fantasai: a no-preference mode in that set wouldn't mean much, and it would be interpreted as light<br>
&lt;jensimmons> There’s just two  — ligth &amp; dark. If we give Authors 3 or 5 options — what does that mean????<br>
&lt;fremy> fantasai: also, rather than adding yet another keyword, it would make a lot of sense to have apple map their preference to map their light theme to both light and no-preference, then websites can respond to this<br>
&lt;tantek> s/ligth/light<br>
&lt;fremy> fantasai: in a way that's better than just os-targeting<br>
&lt;fremy> Rossen_: ok, I hear even more people trying to reply, let's not get into this more<br>
&lt;tantek> +1 fantasai, we need a way for implementers to be able to only implement one explicit preference (e.g. dark) and map the others to no preference<br>
&lt;fremy> Rossen_: let's have a break, you are all welcome to discuss this during the break<br>
&lt;fremy> &lt;br><br>
</details>


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

Received on Thursday, 6 June 2019 14:40:29 UTC