- From: James Craig via GitHub <sysbot+gh@w3.org>
- Date: Wed, 07 Sep 2016 14:59:31 +0000
- To: public-css-archive@w3.org
Listing related potential media features for contrast and inversion, since "inverted-colors" was also deferred again from CSS MQ Level 4 earlier this year. - `inverted-colors: [none | invert];` (I think a prefer-vs-forced variant is unlikely. People usually prefer dark color schemes rather than complete inversion whenever possible, so inversion is always a 'forced' last result for the user.) **Mutually exclusive user prefs ideas for color ** - `prefers-color-scheme: [none | dark-on-light | light-on-dark]; Note: Microsoft calls these black-on-white and white-on-black. IIRC, they used to have a yellow-on-blue; @cyns would know more. See the [MSDN page for -ms-high-contrast](https://msdn.microsoft.com/en-us/library/windows/apps/hh465764.aspx) - user-color/user-background-color: See the now-defunct [IndieUI User Context section on HSLA user-defined foreground/background colors](https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-context.html#userColors) **Example usage of user color MQs and user-pref() variables** ``` @media (user-color) and (user-background-color) { html, body { /* Syntax for the user-pref variables was to be specified in one of the CSS MQ modules. */ color: user-pref(color); background-color: user-pref(background-color); } } ``` **Example usage of the "-luminosity" suffix for HSLA-based MQs** ``` /* Use default logo that looks good on lighter background colors. */ .logo { background-image: url(./img/logo_light.png);} /* Note: this example uses the greater-than/less-than syntax likely to be adopted by CSS MQ4. */ @media (user-background-color-luminosity < 40) { /* User background color is dark; use logo variant that looks better on dark colors. */ .logo { background-image: url(./img/logo_dark.png); } } ``` -- GitHub Notification of comment by cookiecrook Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/443#issuecomment-245308447 using your GitHub account
Received on Wednesday, 7 September 2016 14:59:41 UTC