@@ -60,12 +60,11 @@ Foreground Color: the 'color' property</h2>
60
60
Inherited : yes
61
61
Percentages : N/A
62
62
Media : visual
63
- Computed value : an RGBA color
63
+ Computed value : See <a>resolving color values</a>
64
64
</pre>
65
65
66
66
This property describes the foreground fill color of an element's text content.
67
- In addition, it provides the value that ''currentcolor'' resolves to.
68
- If the ''currentcolor'' keyword is set on the 'color' property itself, it is treated as ''color: inherit'' .
67
+ In addition, it provides the value that ''<color>/currentcolor'' resolves to.
69
68
70
69
The initial value of this property is ''black'' .
71
70
@@ -161,6 +160,67 @@ Notes On Using Colors</h3>
161
160
Really? Isn't HD video in Rec.709? Shouldn't video be consistent with images?
162
161
Or do implementations really do this differently?
163
162
163
+ <h2 id='resolving-color-values'>
164
+ Resolving Color values</h2>
165
+
166
+ Various properties accept <<color>> values.
167
+ Unless an exception is explicitly defined,
168
+ all such properties must <dfn lt="resolve color values|resolving color values">resolve color values</dfn> as defined below
169
+ to determine the <a>computed value</a> and the <a>used value</a> for <<color>> .
170
+
171
+ <ul>
172
+ <li>
173
+ The computed value of the ''<color>/currentcolor'' keyword is ''<color>/currentcolor'' .
174
+
175
+ If ''<color>/currentcolor'' is used as the value of the 'color' property,
176
+ the used value is the same as if ''inherit'' had been specified instead.
177
+ For all other properties that accept a <<color>> ,
178
+ the used value of ''<color>/currentcolor'' is the same as
179
+ the used value of the 'color' property on the same element.
180
+
181
+ Note: This means that if the ''<color>/currentcolor'' value is inherited,
182
+ it’s inherited as a keyword,
183
+ not as the value of the 'color' property,
184
+ so descendants will use their own 'color' property to resolve it.
185
+
186
+ <li>
187
+ The computed value and used value of ''<color>/transparent'' is ''rgba(0,0,0,0)'' .
188
+
189
+ <li>
190
+ The computed value and used value of
191
+ <a>named colors</a> (including <<deprecated-system-color>> colors),
192
+ 3 and 6 digits <a>hex colors</a> ,
193
+ comma separated ''rgb()'' colors without an alpha channel,
194
+ and comma separated ''hsl()'' colors without an alpha channel,
195
+ is the equivalent numeric value in comma separated ''rgb()'' notation omitting the alpha value.
196
+
197
+ <li>
198
+ The computed value and used value of
199
+ 4 and 8 digits <a>hex colors</a> ,
200
+ comma separated ''rgba()'' colors with an alpha channel,
201
+ and comma separated ''hsla()'' colors with an alpha channel,
202
+ is the equivalent numeric value in comma separated ''rgba()'' notation with the alpha value.
203
+
204
+ </ul>
205
+
206
+ <div class=issue>
207
+ The above defines values that are already implemented
208
+ based on the most interoperable behavior.
209
+ We still need to define how newer syntaxes work:
210
+ * comma-less with slash separated optional alpha variants of ''rgb()'' , ''rgba()'' , ''hsl()'' , ''hsla()''
211
+ * comma separated with optional alpha variants of ''rgb()'' , ''rgba()'' , ''hsl()'' , ''hsla()''
212
+ * ''device-cmyk()''
213
+ * ''hwb()''
214
+ * ''lab()'' and ''lch()''
215
+ * ''gray()''
216
+ * ''color()''
217
+ * ''color-mod()''
218
+ </div>
219
+
220
+ Issue: Define if changing the working color space should have any impact on the above.
221
+
222
+ Any future specification extending the syntax of <<color>>
223
+ must define the how to <a>resolve color values</a> for the new extensions.
164
224
165
225
<h2 id='numeric-rgb'>
166
226
RGB Colors</h2>
@@ -639,17 +699,10 @@ The ''transparent'' keyword</h3>
639
699
640
700
641
701
<h3 id='currentcolor-color'>
642
- The ''currentcolor'' keyword</h3>
643
-
644
- The keyword <dfn value for="<color>">currentcolor</dfn> takes its value from the value of the 'color' property on the same element.
645
- This happens at <strong> used-value time</strong> ,
646
- which means that if the value is inherited,
647
- it's inherited as ''currentcolor'' ,
648
- not as the value of the 'color' property,
649
- so descendants will use their <em> own</em> 'color' property to resolve it.
702
+ The ''<color>/currentcolor'' keyword</h3>
650
703
651
- If ''currentcolor'' is used as the value of the 'color' property,
652
- it instead takes its value from the inherited value of the ' color' property .
704
+ The keyword <dfn value for="<color>">currentcolor</dfn> represents value of the 'color' property on the same element.
705
+ Its <a>computed value</a> and <a>used values</a> are determined by <a>resolving color values</a> .
653
706
654
707
<div class='example'>
655
708
Here's a simple example showing how to use the ''currentcolor'' keyword:
0 commit comments