Skip to content

Commit db2d17d

Browse files
committed
[css-color] Dfn system colors, and add them to the definition of <color>.
1 parent 3b96cae commit db2d17d

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

css-color/Overview.bs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ Representing Colors: the <<color>> type</h2>
123123
<pre class='prod'>
124124
<dfn>&lt;color></dfn> = <<rgb()>> | <<rgba()>> | <<hsl()>> | <<hsla()>> |
125125
<<hwb()>> | <<gray()>> | <<device-cmyk()>> | <<color()>> |
126-
<<hex-color>> | <<named-color>> | currentcolor
126+
<<hex-color>> | <<named-color>> | currentcolor |
127+
<<deprecated-system-color>>
127128
</pre>
128129

129130
Some operations work differently on <dfn export>achromatic</dfn> colors.
@@ -2346,6 +2347,7 @@ Sample style sheet for (X)HTML</h2>
23462347
Appendix A: Deprecated CSS System Colors</h2>
23472348

23482349
Earlier versions of CSS defined several additional named color keywords,
2350+
the <dfn>&lt;deprecated-system-color></dfn>s,
23492351
which were meant to take their value from operating system themes.
23502352
These color names have been <strong>deprecated</strong>, however,
23512353
as they are insufficient for their original purpose

css-color/Overview.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</p>
8383
<h1 class="p-name no-ref" id=title>CSS Color Module Level 4</h1>
8484
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
85-
<span class=dt-updated><span class=value-title title=20140327>27 March 2014</span></span></span></h2>
85+
<span class=dt-updated><span class=value-title title=20140415>15 April 2014</span></span></span></h2>
8686
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-color/>http://dev.w3.org/csswg/css-color/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-color/>http://dev.w3.org/csswg/css-color/</a>
8787
<dt>Feedback:</dt>
8888
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-color%5D%20feedback">www-style@w3.org</a>
@@ -262,7 +262,8 @@ <h2 class="heading settled heading" data-level=3 id=color-type><span class=secno
262262

263263
<pre class=prod><dfn class=css-code data-dfn-type=type data-export="" id=typedef-color>&lt;color&gt;<a class=self-link href=#typedef-color></a></dfn> = <a class="production css-code" data-link-type=function href=#funcdef-rgb title=rgb()>&lt;rgb()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-rgba title=rgba()>&lt;rgba()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-hsl title=hsl()>&lt;hsl()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-hsla title=hsla()>&lt;hsla()&gt;</a> |
264264
<a class="production css-code" data-link-type=function href=#funcdef-hwb title=hwb()>&lt;hwb()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-gray title=gray()>&lt;gray()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-device-cmyk title=device-cmyk()>&lt;device-cmyk()&gt;</a> | <a class="production css-code" data-link-type=function href=#funcdef-color title=color()>&lt;color()&gt;</a> |
265-
<a class="production css-code" data-link-type=type href=#typedef-hex-color title="<hex-color>">&lt;hex-color&gt;</a> | <a class="production css-code" data-link-type=type href=#typedef-named-color title="<named-color>">&lt;named-color&gt;</a> | currentcolor
265+
<a class="production css-code" data-link-type=type href=#typedef-hex-color title="<hex-color>">&lt;hex-color&gt;</a> | <a class="production css-code" data-link-type=type href=#typedef-named-color title="<named-color>">&lt;named-color&gt;</a> | currentcolor |
266+
<a class="production css-code" data-link-type=type href=#typedef-deprecated-system-color title="<deprecated-system-color>">&lt;deprecated-system-color&gt;</a>
266267
</pre>
267268
<p> Some operations work differently on <dfn data-dfn-type=dfn data-export="" id=achromatic>achromatic<a class=self-link href=#achromatic></a></dfn> colors.
268269
An <a data-link-type=dfn href=#achromatic title=achromatic>achromatic</a> color is a shade of gray:
@@ -776,7 +777,7 @@ <h3 class="heading settled heading" data-level=5.2 id=currentcolor-color><span c
776777
</pre> </div>
777778

778779
<div class=example>
779-
For example, the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-text-decor-3/#text-emphasis-color title=text-emphasis-color>text-emphasis-color</a> property <a data-biblio-type=informative data-link-type=biblio href=#css3-text-decor title=css3-text-decor>[CSS3-TEXT-DECOR]</a>,
780+
For example, the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-text-decor-3/#propdef-text-emphasis-color title=text-emphasis-color>text-emphasis-color</a> property <a data-biblio-type=informative data-link-type=biblio href=#css3-text-decor title=css3-text-decor>[CSS3-TEXT-DECOR]</a>,
780781
whose initial value is <a class=css data-link-type=maybe href=#valuedef-currentcolor title=currentcolor>currentcolor</a>,
781782
by default matches the text color
782783
even as the <a class=property data-link-type=propdesc href=#propdef-color title=color>color</a> property changes across elements.
@@ -1738,7 +1739,7 @@ <h2 class="heading settled heading" data-level=8 id=grays><span class=secno>8 </
17381739
<p> <span class=css data-link-type=maybe title=gray(a)>gray(A)</span> represents the same color as <span class=css data-link-type=maybe title=rgb(a,a,a)>rgb(A,A,A)</span>.
17391740
<span class=css data-link-type=maybe title=gray(a,b)>gray(A,B)</span> represents the same color as <span class=css data-link-type=maybe title=rgb(a,a,a,b)>rgb(A,A,A,B)</span>.
17401741

1741-
<div class=issue id=issue-a00cd53b><a class=self-link href=#issue-a00cd53b></a>
1742+
<div class=issue id=issue-840a4cfe><a class=self-link href=#issue-840a4cfe></a>
17421743
<a data-link-type=functionish href=#funcdef-gray title=gray()>gray()</a> should have a keyword arg that opts it into smarter modes.
17431744
"luminance", for example, instead of being a simple expansion to <a class=css data-link-type=maybe href=#funcdef-rgb title=rgb()>rgb()</a>,
17441745
could actually compute the gray with the specified luminance.
@@ -1941,7 +1942,7 @@ <h2 class="heading settled heading" data-level=10 id=modifying-colors><span clas
19411942
(<span class=css data-link-type=maybe title="hsl(120deg, 20%, 56%)">hsl(120deg, 20%, 56%)</span>, slightly lighter and brighter than the original color, which is what was intended).
19421943
</div>
19431944

1944-
<div class=issue id=issue-71a06996><a class=self-link href=#issue-71a06996></a>
1945+
<div class=issue id=issue-929de920><a class=self-link href=#issue-929de920></a>
19451946
More possibilities:
19461947

19471948
<p> <ul>
@@ -2203,7 +2204,7 @@ <h3 class="heading settled heading" data-level=10.4 id=blend-adjuster><span clas
22032204
but isn’t motivated by any theory.
22042205
</dl>
22052206

2206-
<p class=issue id=issue-4877d794><a class=self-link href=#issue-4877d794></a>
2207+
<p class=issue id=issue-055d1232><a class=self-link href=#issue-055d1232></a>
22072208
Should we swap the defaults,
22082209
so <span class=css data-link-type=maybe title=blend()>blend()</span> does the alpha blending,
22092210
and another name (or maybe another parameter) ignores alpha like <span class=css data-link-type=maybe title=blend()>blend()</span> currently does?
@@ -2434,6 +2435,7 @@ <h2 class="no-num heading settled heading" id=system-colors><span class=content>
24342435
Appendix A: Deprecated CSS System Colors</span><a class=self-link href=#system-colors></a></h2>
24352436

24362437
<p> Earlier versions of CSS defined several additional named color keywords,
2438+
the <dfn class=css-code data-dfn-type=type data-export="" id=typedef-deprecated-system-color>&lt;deprecated-system-color&gt;<a class=self-link href=#typedef-deprecated-system-color></a></dfn>s,
24372439
which were meant to take their value from operating system themes.
24382440
These color names have been <strong>deprecated</strong>, however,
24392441
as they are insufficient for their original purpose
@@ -2710,7 +2712,7 @@ <h2 class="no-num no-ref heading settled heading" id=references><span class=cont
27102712

27112713
<h3 class="no-num no-ref heading settled heading" id=normative><span class=content>
27122714
Normative References</span><a class=self-link href=#normative></a></h3>
2713-
<div data-fill-with=normative-references><dl><dt id=css21 title=CSS21><a class=self-link href=#css21></a>[CSS21]<dd>Bert Bos; et al. <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>http://www.w3.org/TR/2011/REC-CSS2-20110607</a><dt id=rfc2119 title=RFC2119><a class=self-link href=#rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a><dt id=srgb title=SRGB><a class=self-link href=#srgb></a>[SRGB]<dd>???. <a href="http://www.iec.ch/nr1899.htm ">Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB</a>. as amended by Amendment A1:2003. URL: <a href="http://www.iec.ch/nr1899.htm ">http://www.iec.ch/nr1899.htm </a><dt id=svg11 title=SVG11><a class=self-link href=#svg11></a>[SVG11]<dd>Erik Dahlström; et al. <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/>Scalable Vector Graphics (SVG) 1.1 (Second Edition)</a>. 16 August 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/>http://www.w3.org/TR/2011/REC-SVG11-20110816/</a></dl></div>
2715+
<div data-fill-with=normative-references><dl><dt id=css21 title=CSS21><a class=self-link href=#css21></a>[CSS21]<dd>Bert Bos; et al. <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>http://www.w3.org/TR/2011/REC-CSS2-20110607</a><dt id=rfc2119 title=RFC2119><a class=self-link href=#rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a><dt id=srgb title=SRGB><a class=self-link href=#srgb></a>[SRGB]<dd>???. <a href=http://www.iec.ch/nr1899.htm>Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB</a>. as amended by Amendment A1:2003. URL: <a href=http://www.iec.ch/nr1899.htm>http://www.iec.ch/nr1899.htm</a><dt id=svg11 title=SVG11><a class=self-link href=#svg11></a>[SVG11]<dd>Erik Dahlström; et al. <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/>Scalable Vector Graphics (SVG) 1.1 (Second Edition)</a>. 16 August 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-SVG11-20110816/>http://www.w3.org/TR/2011/REC-SVG11-20110816/</a></dl></div>
27142716

27152717
<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
27162718
Informative References</span><a class=self-link href=#informative></a></h3>
@@ -2783,6 +2785,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
27832785
<li>darkviolet, <a href=#valuedef-darkviolet title="section 5">5</a>
27842786
<li>deeppink, <a href=#valuedef-deeppink title="section 5">5</a>
27852787
<li>deepskyblue, <a href=#valuedef-deepskyblue title="section 5">5</a>
2788+
<li>&lt;deprecated-system-color&gt;, <a href=#typedef-deprecated-system-color title="section Unnumbered section">Unnumbered section</a>
27862789
<li>device-cmyk(), <a href=#funcdef-device-cmyk title="section 9">9</a>
27872790
<li>dimgray, <a href=#valuedef-dimgray title="section 5">5</a>
27882791
<li>dimgrey, <a href=#valuedef-dimgrey title="section 5">5</a>
@@ -2934,9 +2937,9 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29342937
<h2 class="no-num no-ref heading settled heading" id=property-index><span class=content>
29352938
Property index</span><a class=self-link href=#property-index></a></h2>
29362939
<div data-fill-with=property-index><table class="proptable data"><thead><tr><th scope=col>Name<th scope=col>Value<th scope=col>Initial<th scope=col>Applies to<th scope=col>Inh.<th scope=col>%ages<th scope=col>Media<th scope=col>Computed value<tbody>
2937-
<tr><th scope=row><a data-property="">color</a><td>&lt;color&gt;<td>UA-defined, see prose<td>all elements<td>yes<td>N/A<td>visual<td>an RGBA color
2938-
<tr><th scope=row><a data-property="">opacity</a><td>&lt;alpha-value&gt;<td>1<td>all elements<td>no<td>N/A<td>visual<td>The specified value, clamped to the range [0,1].
2939-
<tr><th scope=row><a data-property="">color-correction</a><td>auto | sRGB<td>auto<td>all elements<td>yes<td>N/A<td>visual<td>as specified</table></div>
2940+
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-color title=color>color</a><td>&lt;color&gt;<td>UA-defined, see prose<td>all elements<td>yes<td>N/A<td>visual<td>an RGBA color
2941+
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-opacity title=opacity>opacity</a><td>&lt;alpha-value&gt;<td>1<td>all elements<td>no<td>N/A<td>visual<td>The specified value, clamped to the range [0,1].
2942+
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-color-correction title=color-correction>color-correction</a><td>auto | sRGB<td>auto<td>all elements<td>yes<td>N/A<td>visual<td>as specified</table></div>
29402943

29412944

29422945
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
@@ -2964,7 +2967,7 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
29642967
you convert between contrast-ratio space and luminance space
29652968
with <code>L = 21^p</code>,
29662969
then find the gray with that luminance.
2967-
</p><a href=#issue-a00cd53b></a></div>
2970+
</p><a href=#issue-840a4cfe></a></div>
29682971

29692972

29702973
<div class=issue>
@@ -2987,7 +2990,7 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
29872990
<li>
29882991
Warmer/cooler. How to define? What’s warmer, red or yellow? What’s cooler, blue or green?
29892992
</ul>
2990-
<a href=#issue-71a06996></a></div>
2993+
<a href=#issue-929de920></a></div>
29912994

29922995

29932996
<div class=issue>
@@ -3002,7 +3005,7 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
30023005
and another name (or maybe another parameter) ignores alpha like <span class=css data-link-type=maybe title=blend()>blend()</span> currently does?
30033006

30043007

3005-
<a href=#issue-4877d794></a></div><div class=issue>
3008+
<a href=#issue-055d1232></a></div><div class=issue>
30063009
Really? Shouldn’t video be consistent with images?
30073010
Or do implementations really do this differently?
30083011

0 commit comments

Comments
 (0)