Skip to content

Commit

Permalink
[css-color-4] Add new set of CSS system colors (addresses w3c#3804)
Browse files Browse the repository at this point in the history
  • Loading branch information
Melanie Richards committed Jul 5, 2019
1 parent 9f5facd commit fa26ef9
Showing 1 changed file with 54 additions and 21 deletions.
75 changes: 54 additions & 21 deletions css-color-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Representing sRGB Colors: the <<color>> type</h2>
<dfn>&lt;color></dfn> = <<rgb()>> | <<rgba()>> | <<hsl()>> | <<hsla()>> |
<<hwb()>> | <<gray()>> | <<device-cmyk()>> |
<<hex-color>> | <<named-color>> | currentcolor |
<<deprecated-system-color>>
<<system-color>>
</pre>

Some operations work differently on <dfn export>achromatic</dfn> colors.
Expand Down Expand Up @@ -209,7 +209,7 @@ Resolving Color values</h2>

<li>
The computed value and used value of
<a>named colors</a> (including <<deprecated-system-color>> colors),
<a>named colors</a> (including <<system-color>> colors),
3 and 6 digits <a>hex colors</a>,
4 and 8 digits <a>hex colors</a> with an explicitly opaque alpha channel,
comma separated ''rgb()'' colors without an alpha channel,
Expand Down Expand Up @@ -2332,6 +2332,56 @@ Converting Between Uncalibrated CMYK and RGB-Based Colors</h3>
<li>fallback color must be set to the input color
</ul>


<h2 id="css-system-colors">
CSS System Colors</h2>

In addition to being able to assign color keyword values to text,
backgrounds, etc., CSS defines a set of
<dfn id="system-color" lt="system colors" export>&lt;system color></dfn> values, to allow
authors to specify colors in a manner that integrate them into the user's
graphic environment.

For systems that do not have a corresponding value, the specified value
should be mapped to the nearest system color value, or to a default color.
Note that some profiles of CSS may not support System Colors at all.

The following lists the additional values for color-related CSS values and their
general meaning. This list includes a subset of system colors defined in CSS2;
authors should not use additional system colors documented in <a>deprecated system colors</a>.

Any color property can take one of the following names. Although
these are case-insensitive, it is recommended that the mixed capitalization shown
below be used, to make the names more legible.

<dl id="system-color-values" data-dfn-type="value" dfn-for="<system-color>" export>
<dt><dfn>ActiveText</dfn>
<dd>Text in active links.
<dt><dfn>ButtonFace</dfn>
<dd>The face background color for push buttons.
<dt><dfn>ButtonText</dfn>
<dd>Text on push buttons.
<dt><dfn>Canvas</dfn>
<dd>Window background.
<dt><dfn>Field</dfn>
<dd>Background of input fields.
<dt><dfn>FieldText</dfn>
<dd>Text in input fields.
<dt><dfn>GrayText</dfn>
<dd>Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.
<dt><dfn>Highlight</dfn>
<dd>Item(s) selected in a control.
<dt><dfn>HighlightText</dfn>
<dd>Text of item(s) selected in a control.
<dt><dfn>LinkText</dfn>
<dd>Text in non-active, non-visited links.
<dt><dfn>Text</dfn>
<dd>Text in windows.
<dt><dfn>VisitedText</dfn>
<dd>Text in visited links.
</dl>


<h2 id="transparency">
Transparency: the 'opacity' property</h2>

Expand Down Expand Up @@ -2759,11 +2809,11 @@ Default Style Rules</h2>

</pre>

<h2 id="system-colors" class="no-num">
<h2 id="deprecated-system-colors" class="no-num">
Appendix A: Deprecated CSS System Colors</h2>

Earlier versions of CSS defined several additional named color keywords,
the <dfn>&lt;deprecated-system-color></dfn>s,
the <dfn id="deprecated-system-color" lt="deprecated system colors" export>system colors</dfn>&lt;deprecated-system-color></dfn>s,
which were meant to take their value from operating system themes.
These color names have been <strong>deprecated</strong>, however,
as they are insufficient for their original purpose
Expand All @@ -2790,10 +2840,6 @@ Appendix A: Deprecated CSS System Colors</h2>
<dt><dfn>Background</dfn>
<dd>Desktop background.

<dt><dfn>ButtonFace</dfn>
<dd>The face background color for 3-D elements that appear 3-D due to
one layer of surrounding border.

<dt><dfn>ButtonHighlight</dfn>
<dd>The color of the border facing the light source for 3-D elements
that appear 3-D due to one layer of surrounding border.
Expand All @@ -2802,22 +2848,9 @@ Appendix A: Deprecated CSS System Colors</h2>
<dd>The color of the border away from the light source for 3-D elements
that appear 3-D due to one layer of surrounding border.

<dt><dfn>ButtonText</dfn>
<dd>Text on push buttons.

<dt><dfn>CaptionText</dfn>
<dd>Text in caption, size box, and scrollbar arrow box.

<dt><dfn>GrayText</dfn>
<dd>Grayed (disabled) text. This color is set to #000 if
the current display driver does not support a solid gray color.

<dt><dfn>Highlight</dfn>
<dd>Item(s) selected in a control.

<dt><dfn>HighlightText</dfn>
<dd>Text of item(s) selected in a control.

<dt><dfn>InactiveBorder</dfn>
<dd>Inactive window border.

Expand Down

0 comments on commit fa26ef9

Please sign in to comment.