Closed nigelmegitt closed 6 years ago
This is a frivolous and unnecessary change. I will not make it.
I noticed while doing this that the named color orange
in CSS is not supported in TTML. @skynavga any idea why not? Seems like a bizarre and arbitrary omission.
And brown
, and probably others...
No, the list is at https://www.w3.org/TR/CSS2/syndata.html#value-def-color and brown isn't in it. I guess there may be a larger set of named colors in some other spec, but if we're on CSS 2.1 there are 17 of them.
The TTML2 reference for the source of the chosen named colors is SVG 1.1, section 4.2 which has an extended named color set:
SVG supports all of the syntax alternatives for
defined in CSS2 syntax and basic data types ([CSS2], section 4.3.6), with the exception that SVG allows an expanded list of recognized color keywords names.
which is defined here: http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#ColorKeywords Maybe the intent of TTML1 years ago was to constraint it to CSS2, but that's clearly not what the draft says today. If you want to reject brown, I don't really care, except that is just as arbitrary without also changing the named color citation to be only the CSS2 named colors.
When we designed DFXP we decided to limit named colors to the list in CSS2 1998 which were the HTML4.0 colors, namely
The list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. These 16 colors are defined in HTML 4.0 ([HTML40]).
to which we added transparent
, magenta
, and cyan
, the first from SVG, and the last two as aliases for fuschia
and aqua
.
At this point, I think we should not add any more named colors.
@mikedo I didn't realise that the Note under <named-color>
was a reference to the source; I read it as a useful hint. The derivation for tts:color
is listed as XSL.
I don't have a strong view on adding new named colors, but it does seem generally like a good idea to match the CSS named color set where possible, if only to avoid author confusion - for example, author sees that named colors can be used, looks up the normal set of web named colors, finds that "orange" is ideal for their purposes, but then it doesn't work. There doesn't seem to be a good argument for persisting this "not working" when the cost of adding a new named color seems low.
The Working Group just discussed Reference CSS color semantic #413
, and agreed to the following resolutions:
SUMMARY: We will not add "orange" now but ask CSS WG to align named colors with SVG and then look at this again.
Regarding orange
, another unexpected data point: https://www.w3.org/TR/css3-color/#valuea-def-color omits orange! However in §4.3 the extended color keywords include cyan
and magenta
, so in fact the alignment we wanted with SVG already exists, and implementations can simply copy across any valid named color from TTML into CSS and it should work. This is easier for implementers working in CSS.
Fixed in 924d6cd47f0e36daa5b13fef95c6aa9ac6b88d72.
Part of umbrella #406
Current semantic based on: XSL 1.1 §7.18.1 https://www.w3.org/TR/2006/REC-xsl11-20061205/#color Current CSS snapshot version of this semantic: CSS 2.1 §14.1 https://www.w3.org/TR/CSS2/colors.html#colors
The XSL spec references the CSS spec to define the semantic.
Action to take: replace XSL spec reference with CSS spec reference.