Skip to content

Commit

Permalink
[css-color-adjust] Define color-scheme: normal to be hookable by HTML.
Browse files Browse the repository at this point in the history
This allows HTML to "set" the used value of the color-scheme property,
via a meta tag.

Part of whatwg/html#7213
Closes #6726
  • Loading branch information
emilio committed Oct 15, 2021
1 parent 9885aa0 commit aee8efe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions css-color-adjust-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,20 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme
user agents cannot automatically adapt the colors used in elements under their control,
as it might cause unreadable color contrast with the surrounding page.

Host languages can define the <dfn export>page's supported color schemes</dfn>,
a list of [=color schemes=] supported by default for all elements on that page.

Note: [[HTML]] specifies a
<a href="https://html.spec.whatwg.org/multipage/semantics.html#meta-color-scheme">color-scheme</a>
<{meta}> tag which can be used to set the [=page's supported color schemes=].

Values are defined as follows:

<dl dfn-type=value dfn-for=color-scheme>
: <dfn>normal</dfn>
::
Indicates that the element doesn't support [=color schemes=] at all,
and so the element should be rendered with the browser's default [=color scheme=].

(This is typically, tho not always, similar to ''light''.)
Indicates that the element supports the [=page's supported color schemes=],
if they are set, or that it supports no [=color schemes=] at all otherwise.

: <dfn>light</dfn>
::
Expand Down Expand Up @@ -317,11 +322,6 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme
the rest of the page will respect the user's preference.
</div>

Note: [[HTML]] specifies a
<a href="https://html.spec.whatwg.org/multipage/semantics.html#meta-color-scheme">color-scheme</a>
<{meta}> tag which can be used to set the color-scheme on the root element as
a [[css-cascade-4#preshint|non-CSS presentational hint]].

Note: Repeating a keyword, such as ''color-scheme: light light'',
is valid but has no additional effect
beyond what the first instance of the keyword provides.
Expand Down

0 comments on commit aee8efe

Please sign in to comment.