From e5035fe3ac8aeafcb45fe5ed9d5caf6abfdb5e9a Mon Sep 17 00:00:00 2001
From: Rune Lillesveen
Date: Wed, 23 Sep 2020 16:41:17 +0200
Subject: [PATCH 1/2] [css-color-adjust-1] Move color-scheme meta to HTML
Per resolution in issue #3846. Add a reference to the HTML specification
from the specification of the color-scheme property.
HTML pull request: https://github.com/whatwg/html/pull/5938
---
css-color-adjust-1/Overview.bs | 45 +++-------------------------------
1 file changed, 4 insertions(+), 41 deletions(-)
diff --git a/css-color-adjust-1/Overview.bs b/css-color-adjust-1/Overview.bs
index c33bf688382..9da4ece967b 100644
--- a/css-color-adjust-1/Overview.bs
+++ b/css-color-adjust-1/Overview.bs
@@ -218,6 +218,10 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme
affects what <>s resolve to.
+ [[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: “Light” and “dark” color schemes are not specific color palettes.
For example,
both a stark black-on-white scheme and a sepia dark-on-tan scheme
@@ -260,47 +264,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}
====================
From 8f47ae41c4cb3d20e73f867373984d4ee8f73783 Mon Sep 17 00:00:00 2001
From: Rune Lillesveen
Date: Thu, 24 Sep 2020 09:12:13 +0200
Subject: [PATCH 2/2] fixup! [css-color-adjust-1] Move color-scheme meta to
HTML
---
css-color-adjust-1/Overview.bs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/css-color-adjust-1/Overview.bs b/css-color-adjust-1/Overview.bs
index 9da4ece967b..9bea1ab89d5 100644
--- a/css-color-adjust-1/Overview.bs
+++ b/css-color-adjust-1/Overview.bs
@@ -218,10 +218,6 @@ Opting Into a Preferred Color Scheme: the 'color-scheme' property {#color-scheme
affects what <>s resolve to.
- [[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: “Light” and “dark” color schemes are not specific color palettes.
For example,
both a stark black-on-white scheme and a sepia dark-on-tan scheme
@@ -229,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.