Re: [csswg-drafts] [css-ui] Add a way for authors to indicate that they want dark-mode form controls etc (#3299)

The CSS Working Group just discussed `dark mode`.

<details><summary>The full IRC log of that discussion</summary>
&lt;astearns> topic: dark mode<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/3299<br>
&lt;heycam> ScribeNick: heycam<br>
&lt;heycam> futhark: Chrome is soon shipping dark mode for the UI of the browser itself<br>
&lt;heycam> ... respecting the dark mode setting of the OS<br>
&lt;heycam> ... but we also want to render the pages dark<br>
&lt;heycam> ... so the MQs 5 hsa prefers-color-scheme<br>
&lt;heycam> ... letting the authors follow the setting the user has<br>
&lt;heycam> ... but in order to render the content dark for all pages from day 1<br>
&lt;heycam> ... we're looking at a UA intervention that automatically darkens the web pages<br>
&lt;heycam> ... but giving the author the possibility to opt out of that<br>
&lt;heycam> ... and we have looked at a &lt;meta> element that Apple has already implemented<br>
&lt;heycam> ... what it does is that you can specify which color schemes the page can respond to using MQs<br>
&lt;heycam> ... and apply a UA style sheet which renders form controls dark, having a lighter foreground color, using a black canvas backgrdop<br>
&lt;heycam> ... this is basically what safari does<br>
&lt;heycam> ... the proposal here is that we do this with a &lt;meta> element<br>
&lt;heycam> emilio: also the CSS property?<br>
&lt;heycam> futhark: the CSS property I haven't mentioned yet<br>
&lt;heycam> ... there's the posisbility for the page saying that parts of the page are styled itself, but also the possibility to do automatic darkening of other parts of the page<br>
&lt;heycam> ... we get this request for various Google products<br>
&lt;heycam> ... where they want to handle some UI parts themselves in dark<br>
&lt;heycam> ... but automatically darken some content<br>
&lt;fremy> q+<br>
&lt;heycam> smfr: we have to distinguish between auto darkening, which is clobbering what the author's done<br>
&lt;heycam> ... and this thing, which allows the author to tell us they've thought aobut dark mode<br>
&lt;heycam> ... for us this is jus chanign form controls, selection, ...<br>
&lt;florian> q+<br>
&lt;heycam> ... an auto darkifying thing is maybe orthogonal to this<br>
&lt;heycam> futhark: what we've been thinking about is that the &lt;meta> element at the same time it says it wants the dark UA style, it would also opt out of the auto darkening<br>
&lt;heycam> ... because it knows how to render dark pages<br>
&lt;heycam> futhark: when the author has a &lt;meta> saying it knows how to render this page in a dark color scheme, please opt out of auto darkening<br>
&lt;heycam> ... one of the reasons we've been thinking about &lt;meta> is that we don't want any flash of white background<br>
&lt;heycam> ... so having it available early<br>
&lt;xfq> ack db<br>
&lt;AmeliaBR> q+<br>
&lt;emilio> q+<br>
&lt;heycam> dbaron: I agree with a bunch of what Simon said<br>
&lt;heycam> ... there's a long standing problem we've had which is that when we use native form controls and certain things like that, if the user has a dark theme, those don't work with some pages<br>
&lt;heycam> ... e.g. text input is a common one.  if the text input has a dark background with a light text color, and the author overrides only one of bg/fg, it's broken<br>
&lt;heycam> ... as a result we've done work to prevent dark native themes to get through to web content<br>
&lt;heycam> ... some recent Gtk changes broke this<br>
&lt;heycam> ... so I think there are a few separate problems here<br>
&lt;heycam> ... one is the fact that because of these dark theme options in macOS, Windows 10, etc., more users have dark themes<br>
&lt;heycam> ... and in a lot of web contne tthat doesn't work, even if they want it to work<br>
&lt;heycam> ... but we can't just go apply it to web content unless we know it will work with that<br>
&lt;heycam> futhark: that's why we want to rely on the meta element to have the page tell us it's ok<br>
&lt;heycam> dbaron: I think a meta that says "I the page author have thought about this and I know that my page will work with a dark theme" is a good thing<br>
&lt;heycam> ... I think UAs could use it for different things<br>
&lt;heycam> ... one could use it to say "the user has a dark theme, so I will let dark theme data theme, and use the user's preferred form controls for this page"<br>
&lt;heycam> ... or the UA could say "for pages that haven't done this, do auto darkening"<br>
&lt;heycam> ... and a meta that says "I suppor tdark theme" serves both of those purposes but not completely<br>
&lt;heycam> ... if the user wants the entire thing to be dark, working with dark form controls doesn't imply that their whole UI is dark<br>
&lt;heycam> ... so they still might want the auto darkening in that case<br>
&lt;heycam> ... another thing in here I don't like.  it also allows authors to say that their page doesn't work with light pages<br>
&lt;heycam> ... and I'd rather not create this problem<br>
&lt;heycam> futhark: the only keyword?<br>
&lt;heycam> dbaron: you can say supported schemes "dark", and skip light<br>
&lt;heycam> ... in the spirit of trying to do more of what the user wants, where right now users want to see things in dark mode, I'm hesitant to give authors an option to say this page doesn't work in light mode<br>
&lt;heycam> ... for users who want that<br>
&lt;heycam> futhark: there's also the "only" keyword that Safari implements<br>
&lt;heycam> ... don't you have to say "dark only"?<br>
&lt;heycam> smfr: [nods]<br>
&lt;heycam> futhark: if you have a light theme and say "dark only" in the meta tag, you get the authored dark page<br>
&lt;heycam> dholbert: and widgets are dark?<br>
&lt;heycam> smfr: primarily widgets<br>
&lt;xfq> ack fr<br>
&lt;heycam> fremy: I am very curious about how you're going to enforce dark themes on pages that aren't prepared<br>
&lt;heycam> ... I'm skeptical people will like that<br>
&lt;heycam> ... you'll end up with images that look wrong etc.<br>
&lt;heycam> ... for a11y purposes it's a fair tradeoff<br>
&lt;heycam> ... but I am very unsure that people going to bing.com that doesn't support dark theme now the links aren't visible<br>
&lt;gregwhitworth> q?<br>
&lt;heycam> futhark: auto darkening is not something we'd like to spec<br>
&lt;fantasai> +1 to fremy<br>
&lt;heycam> fremy: otoh, replying to david, I don't see why you'd want dark only<br>
&lt;heycam> ... in VS Code, a web app, it has dark menus<br>
&lt;heycam> ... it makes sense for them to say "dark only"<br>
&lt;heycam> ... they want to control all their app UI<br>
&lt;heycam> ... if you're talking about wikipedia, they should probably not say "dark only", but I don't think they will do that<br>
&lt;heycam> ... maybe for a powerpoint thing, if the author has thought about it, why prevent it?<br>
&lt;heycam> dbaron: one of my worries about this stuff is that not all browsers will be able to do all of these things<br>
&lt;heycam> ... if we want web pages to be able to say "dark only", the browsers need a native set of light and dark controls<br>
&lt;heycam> ... which on some platforms is not realistic<br>
&lt;heycam> fremy: you can always have a normal styled fallback for form controls<br>
&lt;xfq> ack fl<br>
&lt;heycam> florian: that's the difference between I prefer dark and I support dark only<br>
&lt;fantasai> slides from the earlier high-contrast discussion: https://lists.w3.org/Archives/Public/www-archive/2019Feb/att-0000/CSSWG_F2F_High_Contrast.pdf<br>
&lt;heycam> ... if you don't have dark controls, and your OS doesn't have them -- that's different from saying "if you show light controls I will be broken"<br>
&lt;heycam> ... we shouldn't have that<br>
&lt;heycam> ... why create that category?<br>
&lt;heycam> ... there are some that would look better with dark controls<br>
&lt;heycam> fremy: VS Code only has dark controls<br>
&lt;fantasai> high constrast explainer https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/HighContrast/explainer.md<br>
&lt;heycam> ... why do they custom style everything?  because they can't get dark controls<br>
&lt;heycam> ... I think what you're saying exists today<br>
&lt;heycam> ... but the web page custom styles every single thing<br>
&lt;heycam> florian: if the OS doesn't support dark controls?<br>
&lt;heycam> fremy: you fall back, just like when you put borders on form controls<br>
&lt;bdc> q+<br>
&lt;heycam> florian: so VS Code will still need to hand code their dark controls, since they can't handle that some OSes will fall back<br>
&lt;heycam> fremy: today the light controls have this fallback today<br>
&lt;gregwhitworth> q?<br>
&lt;heycam> ... if you have a button border-radius:3px, you get the fallback rendering<br>
&lt;heycam> ... and you can do this same fallback for the dark one<br>
&lt;fantasai> high contrast explainer archived:<br>
&lt;fantasai> https://lists.w3.org/Archives/Public/www-archive/2019Feb/0001.html<br>
&lt;heycam> dbaron: I think there is a tradeoff here.  some sites that want to own things so much they will replace the native controls<br>
&lt;heycam> ... there's a tradeoff betwene that and having sites where the controls are more recognizable as such to users<br>
&lt;heycam> ... and the users recognize the thing over there is an input field<br>
&lt;heycam> ... that's a tradeoff<br>
&lt;heycam> ... there's an advantage to contrls that look native<br>
&lt;heycam> ... esp for less experienced users<br>
&lt;heycam> ... if we offer more ability to change what the controls look like, we will pull some designers away from replacing everything<br>
&lt;heycam> ... but we will also push some users into things that are less recognizable for them<br>
&lt;heycam> ... there's no one answer is more correct 100%<br>
&lt;heycam> florian: afaict, the property here, whether it has a bunch of properties or auto vs i-support-dark, does  the same thing at the meta tag? just at a subtree granularity<br>
&lt;heycam> ... whether or not you suppor tdark theme depends on the style sheet, so it belongs in the style sheet rather than meta tag<br>
&lt;heycam> ... I know I will not get full agreement on that<br>
&lt;heycam> gregwhitworth: for end user experience reasons<br>
&lt;heycam> florian: but it could become wrong when you update the style sheet and forget to update the meta<br>
&lt;heycam> gregwhitworth: bad author<br>
&lt;heycam> florian: if you have a page that claims to support dark mode, the author sheet does support dark mode, but user sheet doesn't -- how to tell the page?<br>
&lt;xfq> ack Am<br>
&lt;heycam> futhark: the property wins<br>
&lt;heycam> AmeliaBR: I'm a bit uncomfortable doing style theming in the meta tag because you might have all sorts of flexible themings based on user prefs based on your own thing<br>
&lt;heycam> ... but as long as the style property overrides the meta tag, that's ok<br>
&lt;heycam> ... but then I'm not sure why the meta tag is necessary<br>
&lt;heycam> ... if the style sheet sdon't load, I'm assuming the browser can apply whichever one<br>
&lt;heycam> futhark: if you parse the meta tag, you can apply the black canvas pretty early<br>
&lt;heycam> fremy: it's about flashing<br>
&lt;heycam> AmeliaBR: is there any reason to do the flashing?  if the style sheets haven't loaded can't you have a default bg that is according to the default theme?<br>
&lt;heycam> smfr: every wikipedia page will flash<br>
&lt;heycam> AmeliaBR: ok that's the point of the meta tag, for the default backdrop before style sheets load<br>
&lt;heycam> fantasai: use bgcolor on body? :)<br>
&lt;heycam> ... I totally agree this is not something that belongs in the HTML layer if possible<br>
&lt;heycam> ... if you want to put it there, we have bgcolor<br>
&lt;heycam> ... the best thing there is you can solve that for any background color<br>
&lt;heycam> AmeliaBR: not necessarily because what if the style sheet has a MQ switch based on user preference<br>
&lt;heycam> fantasai: then it will override, but that's better<br>
&lt;heycam> AmeliaBR: you can indicate which themes you support<br>
&lt;heycam> fremy: bgcolor can only supply black, not "which theme the author supports"<br>
&lt;heycam> fantasai: you're only doing this for white or black -- is this a big problem?<br>
&lt;heycam> TabAtkins: if I'm looking at dark screens in bed, I don't want a big flash of white<br>
&lt;heycam> AmeliaBR: why would wikipedia put a meta tag saying "dark only"?<br>
&lt;heycam> florian: they won't hae the tag, so you know it's a light site, but you can still show dark until it shows up<br>
&lt;heycam> [wikipedia just as an example here]<br>
&lt;heycam> AmeliaBR: my other point, repeating some of fremy, if there's any discussion about auto applying styles without author opt in, that should be discussed in the context of accessibile color schemes, high contrast mode, think of it that way<br>
&lt;heycam> ... when you're overriding author styles it's an a11y feature<br>
&lt;heycam> ... but that's separate from trying to match user preferences<br>
&lt;heycam> ... for matching user prefs, I like the idea of making it easier for authors to say this site supports a dark theme, draw default styles for select boxes, if you have one, or saying my styles work well whether you use light or dark whichever the user prefers<br>
&lt;heycam> ... there are sites that are dark that require custom styling for form controls now, so I like the easy way to opt in to native dark mode styles<br>
&lt;fantasai> +1<br>
&lt;heycam> ... we kind of have multiple themes now in browsers<br>
&lt;heycam> ... the "legacy" widget themes, if you much around with styles<br>
&lt;heycam> ... then we have the modern native look buttons in light or dark theme<br>
&lt;heycam> ... I don't know how is the way the prop is currently specced going to interact with that?<br>
&lt;heycam> ... when you revert to the legacy styles<br>
&lt;heycam> futhark: I don't have an answer for that<br>
&lt;heycam> AmeliaBR: if you use this prop are you saying "use the native UI look no matter what other styles I put on the element?"<br>
&lt;heycam> smfr: still has these fallbcak interactions<br>
&lt;heycam> AmeliaBR: so if I wanted styles that say use native dark mode, but if you don't support these new props, and if I want a custom styled dark inputs, you'll need @supports or something?<br>
&lt;heycam> ... will @supports just look at syntax, don't say you support dark mode unless you have one to use<br>
&lt;heycam> ... but that would break an author request of dark or light<br>
&lt;heycam> ... so the keywords need to be recognized even if they don't have matching themes<br>
&lt;heycam> ... can sites detect "do you have a native dark theme"?<br>
&lt;heycam> emilio: that's a fair request<br>
&lt;heycam> ... an author to see if the browser suppotrs a native dark theme or not<br>
&lt;astearns> ack emilio<br>
&lt;heycam> ... it feels to me that the auto darkening has a lot of potential to backfire<br>
&lt;xfq> ack bdc<br>
&lt;heycam> bdc: I think there are 2 different issues<br>
&lt;fantasai> +1 to emilio<br>
&lt;heycam> ... one is that it makes a lot of sense for a page to fit into its environment<br>
&lt;heycam> ... the other use case, which I disagree with, is fremy's example of "I'd prefer a dark theme for my app so I will just use theme by requesting dark controls"<br>
&lt;heycam> ... it's a design shortcut<br>
&lt;heycam> ... it's a differnet purpose IMO<br>
&lt;heycam> ... VS Code is not designing that because they don't have access to a dark mode<br>
&lt;heycam> ... they just design it that way<br>
&lt;heycam> ... to me it's a different use case<br>
&lt;heycam> ... to want to re-use a set of controls that are nicer to the designer's eye is different from fitting to the environment<br>
&lt;florian> +1<br>
&lt;heycam> fremy: the #1 request we got for controls in Edge is sites wanted dark scrollbars<br>
&lt;heycam> ... we don't want to customize the scrollbar, we just want a dark one<br>
&lt;heycam> ... when they do customize it, we get perf issues, etc.<br>
&lt;fantasai> I would like to point out that Adobe Creative Suite uses dark mode for its UI, but the expectation is that content being edited is black-on-white, so it's not that you always want to match content to the OS "theme".<br>
&lt;tantek> +1 same we get requests for dark scrollbars primarily<br>
&lt;fantasai> Sometimes. not always<br>
&lt;heycam> ... that's the point of this prop, this area of the page is dark, it's a choice we made, but we want to play nice with native controls<br>
&lt;heycam> ... for better UX for users<br>
&lt;heycam> ... also, let's say you have a blog engine, you want to support dark theme<br>
&lt;heycam> ... so you say the page supports light and dark<br>
&lt;heycam> ... an embedded component from another origin, it only supportslight<br>
&lt;heycam> ... you need to have a way to say this part of my webpage does not support dark theme, even though my site overall does<br>
&lt;heycam> ... this is the point of the property<br>
&lt;heycam> ... incorporating components from different sites, you might not want to give up your overall site dark theme<br>
&lt;heycam> ... the "dark only" value might not be useful ...<br>
&lt;heycam> ... I have seen sites that just want a dark scrollbar<br>
&lt;heycam> ... and you need "light only" anyway<br>
&lt;heycam> AmeliaBR: anothe rexample, you're concerned it's not respecting user prefs<br>
&lt;heycam> ... for somethings I like a dark theme, but if I'm reading a lot, I can't read a lot of white text on black bg<br>
&lt;heycam> ... so I'm going to have different prefs for different sites<br>
&lt;heycam> ... maybe browsers will one day allow me to set prefs on a per site basis<br>
&lt;heycam> ... but lots of sites have a way for the user to opt in to a theme<br>
&lt;heycam> ... so maybe when they're doing "light only" or "dark only", they're reflecting the user's preference in the site<br>
&lt;heycam> bdc: the way I would summarize is that letting the browser know that you are dark theme compatible is nice, a good citizen in this environment<br>
&lt;heycam> ... doing the opposite is being hostile to the env<br>
&lt;heycam> ... whatever you choose, I'm going to have dark, because I like it<br>
&lt;heycam> fremy: but you could have a theme inside the app<br>
&lt;heycam> AmeliaBR: we can encourage authors to make their sites theme flexible<br>
&lt;heycam> ... just like responsive sites<br>
&lt;heycam> ... but I don't think a dark only is any more hostile than saying background-color:black, etc.<br>
&lt;heycam> ... it's just one way for the author to opt in to a color scheme without setting everything themselves<br>
&lt;heycam> ... and making it a bit more native and familiar<br>
&lt;heycam> bdc: I see that, but it really depends on how many things in the UI that change<br>
&lt;heycam> ... e.g. at some point I think Edge had a title bar that matched the site header color<br>
&lt;heycam> ... here you're forcing UI changes because use as an author prefer black<br>
&lt;heycam> ... it might be pushy<br>
&lt;heycam> Rossen: we used to have a mode that when you pin a site to the taskbar or start menu and you want to use it exclusivle in an app mode<br>
&lt;heycam> ... we would do small things to match the page<br>
&lt;heycam> ... that was the behavior we did<br>
&lt;heycam> bdc: this kind of thing can have an impact on the UI as a whole<br>
&lt;heycam> ... who knows what the OS will do in the future<br>
&lt;heycam> ... so it could affect more things<br>
&lt;heycam> AmeliaBR: good point but it sounds like it's outside the scope of CSS<br>
&lt;heycam> ... anything the browser/OS is doing to extract styles from the page and applying outside the page ...<br>
&lt;heycam> bdc: these properties and meta tags would do that no?<br>
&lt;heycam> florian: just within the page<br>
&lt;heycam> AmeliaBR: the only thing outside we can style with CSS is styling the dark/light bg of the canvas<br>
&lt;heycam> bdc: the chrome of the browser could/should change based on that<br>
&lt;heycam> gregwhitworth: the way I would see this working in Edge, user turns on dark mode, Edge would flip into dark mode, devtools would too<br>
&lt;heycam> ... if you have the meta tag, it would flip to dark controls too, if not, it wouldn't<br>
&lt;AmeliaBR> s/outside we can/outside what we can already/<br>
&lt;heycam> ... is there an issue with that?<br>
&lt;heycam> bdc: not with that<br>
&lt;heycam> ... but in the future making the assumption that if the site opts in that other UI is now dark, then I do<br>
&lt;heycam> dholbert: alerts could be dark<br>
&lt;heycam> gregwhitworth: they're not controlled by you now anyway<br>
&lt;heycam> AmeliaBR: that's an issue on the browser team to decide whether to respond author or OS choices ...<br>
&lt;astearns> q?<br>
&lt;heycam> Rossen: the one thing to keep in mind is that at least in Windows, probably on macOS, we have three levels of where color schemes can apply<br>
&lt;heycam> ... there's the shell, which is only controlled by the user<br>
&lt;heycam> ... usually it doesn't propagate anywhere beside the shell<br>
&lt;heycam> ... then there are apps.  apps are going to depending on the UI framework they use, they may be either forced or opt in to a particular color theme<br>
&lt;heycam> ... regardless of it it's dark or whatever<br>
&lt;heycam> ... then there's the content of these apps<br>
&lt;heycam> ... even besides browsers.  many other apps that have content that could benefit from theming<br>
&lt;heycam> ... and there, it's the choice of the app on whether to propagate that information to the content<br>
&lt;heycam> ... a quick survey of 1st party apps that ship with Windows or macOS, even there is some inconsistency<br>
&lt;heycam> ... e.g. in Windows the shell is always dark, doesn't mean 1st party apps will always be dark<br>
&lt;heycam> ... at the same time, in Edge, there's a user choice to change the UI to be dark mode only<br>
&lt;heycam> ... changing the UI of the browser alone doesn't fit with anything else if the shell is light<br>
&lt;heycam> ... for these cases, to say that because I'm switching my app to be dark, I want everyhing else inside to be dark<br>
&lt;heycam> ... Mail doesn't usually force content to be dark by default<br>
&lt;heycam> ... looking at macOS Mail, it seems this is only done for text only messages<br>
&lt;heycam> ... propagating this down to the site and alowing the site to say "yes I'm fine if you are going to change your UI, regardless where the change came from, I'm going to match it a bit better"<br>
&lt;heycam> ... so I think the overall approach of this proposal doesn't seem crazy, it's just that how do we get to the point where the actual handshake between content and the app layer becomes as transparent/easy as possible<br>
&lt;heycam> ... most platforms today have these 3 tiers of color scheme propagation that, whether or not in this group agree, is irrelevant<br>
&lt;heycam> futhark: one of the things I wanted to figure out is if a meta tag is the right way to do this<br>
&lt;heycam> ... the standardization of a meta tag typically doens't happen in CSS<br>
&lt;heycam> Rossen: what are you optimizing for here?  style sheet download, so that before you navigate you want the right theme applied without flashing?<br>
&lt;heycam> ... if you're going from page to page on wikipedia, and let's say wikipedia had a dark mode, you don't each navigation flash to white<br>
&lt;heycam> ... if we're ok with flashing, then meta tag or property or alternative style sheet would work<br>
&lt;heycam> smfr: we're not ok with flashing<br>
&lt;heycam> ... asked one of our engineers about the meta tag proposal<br>
&lt;heycam> ... there are clients other than browsers, like mail client, it's useful for them to be able to parse the first part of the message without a css parser<br>
&lt;heycam> ... I think that's the primary reason<br>
&lt;heycam> florian: I'm personally not enthusastic about the meta tag, but I understand why you need it<br>
&lt;heycam> ... and as long as you have the property, that's fine<br>
&lt;tantek> q?<br>
&lt;heycam> bdc: the only change you're contemplating is form controls, canvas<br>
&lt;heycam> futhark: foreground color, background color<br>
&lt;heycam> s/canvas/root viewport color/<br>
&lt;tantek> I'm curious if a &lt;style> element would solve the flash or not<br>
&lt;heycam> florian: would this change the bg color of the selection?<br>
&lt;heycam> smfr: yes<br>
&lt;heycam> florian: that's meant to be affected by a normal property on a selector<br>
&lt;heycam> smfr: currently the selection color uses a system provided color<br>
&lt;heycam> ... but this will be overridden<br>
&lt;heycam> ... there's also spelling dots<br>
&lt;heycam> ... and the scrollbar color, even though we have a property for that now<br>
&lt;heycam> ... links too<br>
&lt;heycam> jensimmons: does it also include the colors in the UA sheet?<br>
&lt;heycam> hober: in practice we didn't have to, since it used named colors<br>
&lt;heycam> smfr: in KHTML there was a system color called "text"<br>
&lt;heycam> ... that value persisted to the present day<br>
&lt;heycam> ... now we're using that in the UA sheet<br>
&lt;heycam> ... that becomes white when you use dark mode<br>
&lt;heycam> emilio: we should talk about, because all UAs probably use system colors for this<br>
&lt;heycam> ... doesn't make sense to deprecate things that everyone is using them...<br>
&lt;heycam> dbaron: on system colors, I had a bunch of proposals<br>
&lt;heycam> ... the current set is very Windows specific<br>
&lt;heycam> ... you generally think there is a fg and bg pair<br>
&lt;heycam> ... ButtonText / ButtonFace, HighlightText / Highlight<br>
&lt;heycam> ... in that set, from the Windows API, seeing how the Windows UI used those, there were some non obvious pairs<br>
&lt;heycam> ... there was a set of 4 colors, call them ABCD<br>
&lt;heycam> ... it was confusing<br>
&lt;heycam> ... in 2001..2003, I had a proposal for fixing this by adding another name for the other combinations<br>
&lt;heycam> ... rather than assuming this control always uses the fg color from this control and the bg color from that control<br>
&lt;heycam> ... and Gecko implements a bunch of these behinds prefixes<br>
&lt;heycam> ... additional system colors so we can do sane things on non-Windows<br>
&lt;heycam> ... Dialog and Field<br>
&lt;astearns> ack dbaron<br>
&lt;heycam> ... I would support working un-deprecating system colors given how much they're used, I had some proposals to fix them<br>
&lt;heycam> dbaron: I think it's possible that it might make sense to have 2 different flags rather than 1<br>
&lt;heycam> ... it might be that the aspect of what to do with native controls is different from what to do with default colors<br>
&lt;heycam> ... so you may wish to say that my page supports either light or dark native controls, but I still want to leave the default colors light by default<br>
&lt;heycam> ... not fully thought through<br>
&lt;Rossen> q?<br>
&lt;heycam> florian: I think that makes sense.  think of an existing dark today site, but was written dark with the assumption the UA sheet is light<br>
&lt;heycam> ... and might rely on some thing sfrom there<br>
&lt;heycam> ... even if they want to opt into dark controls<br>
&lt;heycam> emilio: but if you have no meta tag<br>
&lt;heycam> florian: you add the meta tag to use the dark controls<br>
&lt;heycam> emilio: hopefully you then check the page!<br>
&lt;fantasai> bgcolor=dark<br>
&lt;fantasai> :p<br>
&lt;heycam> ... presumably if you request dark theme, look at your page, notice that it has light text that looks broken ...<br>
&lt;heycam> florian: so don't ask for it and hack controls the old way?<br>
&lt;dbaron> https://dbaron.org/css/test/sec1802 has some examples of how the system colors work -- part of the mess is that there are both single-border and double-border styles for raised buttons, which is why there are so many colors for the edges of buttons<br>
&lt;heycam> emilio: on one hand, I agree more configurability is nice.  otoh, exploding the amount of combinations of themes and bits that you can tweak is also going to be a mess<br>
&lt;heycam> florian: the #1 statement before was dark form controls<br>
&lt;heycam> ... not a dark UA style sheet<br>
&lt;heycam> ... why are we coupling the two?<br>
&lt;heycam> AmeliaBR: is the disclosure on details a form control or just a style sheet thing?  so many things<br>
&lt;heycam> florian: fremy earlier stated if you try auto darkening you will get problem<br>
&lt;heycam> ... to me a dark UA sheet is a primitive form of that<br>
&lt;heycam> fremy: but if it's opt in they can fix it<br>
&lt;heycam> ... if they don't want to fix it that's up to them<br>
&lt;heycam> Rossen: not having the foreground color matching form controls would be strange<br>
&lt;heycam> ... let alone backgrounds<br>
&lt;heycam> AmeliaBR: I suspect in most cases the author is going ot override most of the things tha twould be applied on non form controls, like on sites now<br>
&lt;heycam> ... but it seems nice to have the option to have a quick one liner<br>
&lt;heycam> ... just write this web site in a light or dark whatever the user wants<br>
&lt;heycam> ... or write this section in a generic dark style because it's a chunk of text and we won't fuss on it too much<br>
&lt;heycam> florian: if the meta tag switches the UA sheet, does the property too?  how do you switch the UA from light to dark on a subtree level?<br>
&lt;heycam> ... if oyu have a meta dark, and this subtree light only, how do you apply things from the UA sheet in that subtree?<br>
&lt;heycam> Rossen: that's what we do for high contrast<br>
&lt;heycam> florian: you have selectors that depend on the value of a prop?<br>
&lt;heycam> fremy: the colors chnage<br>
&lt;heycam> florian: change the UA sheet?<br>
&lt;heycam> fremy: we don't have a UA sheet for dark theme<br>
&lt;heycam> ... we switch a couple of colors<br>
&lt;heycam> AmeliaBR: but this would allow to opt in not just form controls, but also dark and the page will be light text on dark background, which is essentially the dark UA sheet<br>
&lt;heycam> ... right now we just have appearance<br>
&lt;heycam> ... whether browser styles apply to that element<br>
&lt;heycam> ... but it's only for isolated replaced elements, not paras<br>
&lt;heycam> florian: if the only differnece between light and dark UA sheets, and all differences are system colors, that's doable<br>
&lt;heycam> ... if there is any difference, then you can't do that in a subtree<br>
&lt;dbaron> The other fun question is whether the system color keywords are computed values.<br>
&lt;heycam> astearns: I'm not hearing any objections<br>
&lt;heycam> ... some research into what the meta tag would actually do<br>
&lt;heycam> ... we need more details written down<br>
&lt;heycam> tantek: other question this raises is that there is a hole in the CSS rendering model about initial / transitional paints<br>
&lt;heycam> ... and we're not addressing it<br>
&lt;heycam> ... and the jump to a specific solution like meta tag is a way of ducking that problem<br>
&lt;heycam> ... I believe this group owns this problem<br>
&lt;heycam> ... not saying we're addressing it today, but we should admit it's a problem<br>
&lt;heycam> smfr: there are consumers of HTML/CSS like mail clients without the same navigational behavior as browsers<br>
&lt;heycam> ... when browsers paint during page load is in some cases a differentiator between browsers<br>
&lt;heycam> ... we try to paint not too late or early<br>
&lt;heycam> ... not sure specifying that is productively<br>
&lt;heycam> astearns: not specifying first paint, but specifying some control over what happens in that first paint to avoid flashes<br>
&lt;heycam> ... seems like a good thing to work on<br>
&lt;heycam> fremy: first paint can happen before CSS<br>
&lt;heycam> tantek: I sense a hole<br>
&lt;heycam> ... I won't diagree with smfr that browsers are motivated at doing a good job at, just that it's a hole that authors have asked for control of it, but we haven't provided for<br>
&lt;heycam> ... we can do a better job too, but those two are not in conflict<br>
&lt;heycam> astearns: can you raise an issue on that?<br>
&lt;heycam> ... for the meta tag, seems like we should do some more work and come back with a more concrete proposal<br>
&lt;fremy> scribenick: fremy<br>
</details>


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

Received on Wednesday, 27 February 2019 01:16:32 UTC