[css3-text] [css4-color] currentColor and inheritance

The problem is that currentColor computes to the value of 'color', and
then inherits as that color. This is fine for non-inheritable properties
like 'border-color', for which it was presumably introduced, but it has
some very strange consequences for 'text-emphasis'.

em { text-emphasis: dot; }
strong { color: red; }

<em>Some black text <strong>some red text</em> ...</em>

In general, it's expected that the dots match the color of the text
they're on. If 'text-emphasis-color' didn't exist, we would certainly
expect this behavior. However, if we introduce it, with the initial
value of 'currentColor', then the dots over the red text are black.
And there is no way to get around this surprising behavior.

We need a keyword that means "the current 'color'", but computes
as specified.

~fantasai

Received on Thursday, 12 January 2012 03:22:47 UTC