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

I think what this meta tag does gets pretty clear at the example of [WebKit's user-agent stylesheet](https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css) (do a full text search for "dark").

To illustrate, here's one such CSS rule (using the [`:matches`](https://css-tricks.com/almanac/selectors/m/matches/) pseudo class and WebKit-internal variables like `-apple-system-control-background` as well as WebKit-internal preprocessor directives):

```css
input,
input:matches([type="password"], [type="search"]) {
  -webkit-appearance: textfield;
  #if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT
    color: text;
    background-color: -apple-system-control-background;
  #else
    background-color: white;
  #endif
  […]
}
```



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

Received on Wednesday, 3 April 2019 07:56:06 UTC