Skip to content

Commit

Permalink
Tweak <meta name=color-scheme> definition.
Browse files Browse the repository at this point in the history
Depends on w3c/csswg-drafts#6731
Fixes #7213.
  • Loading branch information
emilio committed Oct 15, 2021
1 parent 5d515fa commit 87768fa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3778,6 +3778,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

<ul class="brief">
<li><dfn data-x-href="https://drafts.csswg.org/css-color-adjust/#color-scheme-prop">'color-scheme'</dfn></li>
<li><dfn data-x-href="https://drafts.csswg.org/css-color-adjust/#pages-supported-color-schemes">page's supported color-schemes</dfn></li>
</ul>

<p>The following term is defined in <cite>CSS Pseudo-Elements</cite>: <ref spec=CSSPSEUDO></p>
Expand Down Expand Up @@ -14589,8 +14590,7 @@ interface <dfn interface>HTMLMetaElement</dfn> : <span>HTMLElement</span> {
be provided in a <code>meta</code> element.</p>

<p>The value must be a string that matches the syntax for the CSS <span>'color-scheme'</span>
property value, and will be cascaded with the color-scheme declarations for the document root
element as described below.</p>
property value. It determines the <span>page's supported color-schemes</span>.</p>

<p>There must not be more than one <code>meta</code> element with its <code
data-x="attr-meta-name">name</code> attribute value set to an
Expand All @@ -14606,7 +14606,7 @@ interface <dfn interface>HTMLMetaElement</dfn> : <span>HTMLElement</span> {

<div w-nodev>

<p>To obtain a page's color-scheme, user agents must run the following steps:</p>
<p>To obtain a <span>page's supported color-schemes</span>, user agents must run the following steps:</p>

<ol>
<li>
Expand All @@ -14631,11 +14631,14 @@ interface <dfn interface>HTMLMetaElement</dfn> : <span>HTMLElement</span> {
<code data-x="attr-meta-content">content</code> attribute.</li>

<li>If <var>parsed</var> is a valid CSS <span>'color-scheme'</span> property value, then
treat that value as a declaration of the CSS <span>'color-scheme'</span> property on
<var>element</var>'s <span>root</span>, cascaded as a <span
data-x="presentational hints">presentational hint</span>, and return.</li>
return <var>parsed</var>.</li>
</ol>
</li>

<li>
<p>Return null.</p>
</li>

</ol>

<p>If any <code>meta</code> elements are <span data-x="node is inserted into a
Expand Down

0 comments on commit 87768fa

Please sign in to comment.