Re: [css-color][compat][css-text-decor] Are more variants of currentcolor needed?

On 25/4/16 15:35, Tab Atkins Jr. wrote:
> On Mon, Apr 25, 2016 at 2:15 AM, Koji Ishii <kojiishi@gmail.com> wrote:
>> 2016/04/23 午前7:26 "Xidorn Quan" <w3c@upsuper.org>:
>>> On Sat, Apr 23, 2016, at 07:50 AM, Tab Atkins Jr. wrote:
>>>> On Fri, Apr 22, 2016 at 1:48 PM, L. David Baron <dbaron@dbaron.org>
>>>> wrote:
>>>>>
>>>>> I presume that it should also influence the color of text-emphasis,
>>>>> although neither Chromium nor Edge appears to implement
>>>>> text-emphasis, and the patches to Gecko so far haven't done this
>>>>> (although I think they should).
>>
>> Chromium supports -webkit-text-emphasis. It looks like it's the value of
>> 'color'.
>
> Confirmed, it treats currentcolor as referring to 'color'.
>
> This indicates that we're just a mishmash, and should converge on one
> or the other, preferably 'color'.

While we're thinking about this, how about text-decoration-color?

https://www.w3.org/TR/css-text-decor-3/#text-decoration-color-property 
says that its initial value is also 'currentColor'.

AFAICS, Chrome & Safari don't currently support this as a CSS property, 
but their behavior implies that if they did, it would be...kinda weird. 
Consider these examples:

(a)
data:text/html,<div style="color:blue;
                            -webkit-text-fill-color:green">hello <u>world

(b)
data:text/html,<div style="color:blue;
                            -webkit-text-fill-color:green;
                            -webkit-text-stroke-color:red">hello <u>world

(c)
data:text/html,<div style="color:blue;
                            -webkit-text-fill-color:green;
                            -webkit-text-stroke-color:red;
                            -webkit-text-stroke-width:1px">hello <u>world

Can you guess the color of the underline on "world" in each case?

The answers I get in current Chrome and Safari are (a) green; (b) green; 
(c) red.

In other words, the used text-decoration-color seems to follow 
'-webkit-text-fill-color' (not 'color'), _unless_ 
'-webkit-text-stroke-width' is greater than zero, in which case it 
follows '-webkit-text-stroke-color' instead.

Please, can we reconsider that and go with something less quirky? (FWIW, 
latest Firefox Nightly gives a green underline in all three cases.)

JK

Received on Monday, 25 April 2016 15:48:52 UTC