diff --git a/css-color-adjust-1/Overview.bs b/css-color-adjust-1/Overview.bs index c33bf688382..9bea1ab89d5 100644 --- a/css-color-adjust-1/Overview.bs +++ b/css-color-adjust-1/Overview.bs @@ -225,6 +225,11 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme To ensure particular foreground or background colors, they need to be specified explicitly. + Note: [[HTML]] specifies a + color-scheme + <{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: Earlier versions of this property also defined an only keyword to be specified alongside a preferred color scheme, indicating a stronger author preference. @@ -260,47 +265,6 @@ Effects of the Used Color Scheme {#color-scheme-effect} via elements intended for graphics (such as <{img}> elements embedding an SVG document). -The "color-scheme" <{meta}> value {#color-scheme-meta} ---------------------------------- - - To aid user agents in rendering the page background with the desired [=color scheme=] immediately - (rather than waiting for all CSS in the page to load), - a 'color-scheme' value can also be provided in a <{meta}> element. - - If any <{meta}> elements are [=inserted into a document=] or [=removed from a document=], - or existing <{meta}> elements have their <{meta/name}> or <{meta/content}> attributes changed, - user agents must run the following algorithm: - -
- 1. Let |candidate elements| be the list of all <{meta}> elements that meet the following criteria, - in [=tree order=]: - - * the element is [=in a document tree=] - * the element has a <{meta/name}> attribute, - whose value is an [=ASCII case-insensitive=] match for color-scheme - * the element has a <{meta/content}> attribute, - whose value is not the empty string - * the element is a child of the [=the head element=] of the document - - 2. For each |element| in |candidate elements|: - 1. If |element|’s <{meta/content}> attribute's value - [=CSS/parses=] as a <'color-scheme'> value, - treat that value as a declaration of the 'color-scheme' property on |element|’s [=tree/root=], - cascaded as a [[css-cascade-4#preshint|non-CSS presentational hint]]. - Then return. - - Note: Because these rules check successive elements until they find a match, - an author can provide multiple such values - to handle fallback for legacy user agents. - Opposite how CSS fallback works for properties, - the multiple <{meta}> elements must be arranged - with the legacy values after the newer values. -
- - Issue(#3846): This algorithm favors the first <{meta}>, - to allow for ASAP rendering with a chosen color scheme. - Is that the desired behavior? - Forced Color Schemes: the 'forced-color-adjust' property {#forced} ====================