W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

[csswg-drafts] Pull Request: Add @media (interface)

From: Jonathan Neal via GitHub <sysbot+gh@w3.org>
Date: Wed, 06 Jun 2018 05:13:32 +0000
To: public-css-archive@w3.org
Message-ID: <pull_request.opened-192901524-1528262006-sysbot+gh@w3.org>
jonathantneal has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== Add @media (interface) ==
This is a rough-draft proposal of a new media feature used to query about the color scheme being used by the operating system.


```css
/* define colors when the interface is light (dark text on a light background) */
@media (interface: light) {
  html { background: #fff; color: #000 }
  a { color: #0000d6 }
}

/* define colors when the interface is dark (light text on a dark background) */
@media (interface: dark) {
  html { background: #000; color: #fff }
  a { color: #00c0ff }
}
```

Applications will respond to these interface changes, and so it will be helpful if webapps can as well.

Related to #2735.


See https://github.com/w3c/csswg-drafts/pull/2742
Received on Wednesday, 6 June 2018 05:13:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 6 June 2018 05:13:50 UTC