Re: [csswg-drafts] [css-color-adjust-1] Limits on the `only` color scheme keyword (#3881)

I do not agree with restricting `only` to light mode.  I think it limits the ability of authors to create accessible, user-friendly interfaces within reasonable design constraints.

Consider the following use cases (which have been mentioned previously, but I don't think everyone quite understood them):

- An author wants to add a light mode / dark mode switch on their website.  This switch will expose these color modes to users who aren't familiar with the OS/browser modes, and will support users who may want a different mode for this specific website than what they use for the rest of the OS. (Toggling dark mode for specific websites is something I hope will be supported in future browsers, but it doesn't yet exist!)

- A website design is dark for brand or content reasons, or uses a mix of dark and light sections to contrast and emphasize different types of content.  The author wants form elements and widgets that match with that design.

As currently spec'd, the only way for the website author to get dark mode form elements and scrollbars in either of these cases is to style them from scratch using `appearance: none` and prefixed pseudo-elements and everything that authors (and users) have been complaining about for years.

If we support `dark only`, these author use cases would be easy, allowing them to directly use the native styles.  Yes, this means that the designs would be sub-optimal on user agents that don't have dark-mode widgets available.  But that doesn't mean that they will be broken. (A website doesn't have to look the same in every browser, after all.)  It certainly doesn't mean that the end result will be any *more* broken than if the author tried to implement their own custom dark mode widgets.

The whole reason for exposing dark mode controls is to make it easier for authors to use the native controls instead of re-implementing them.  Preventing authors from requesting dark mode widgets counteracts this.


-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3881#issuecomment-487329622 using your GitHub account

Received on Sunday, 28 April 2019 00:22:16 UTC