- From: L. David Baron <dbaron@dbaron.org>
- Date: Fri, 22 Apr 2016 13:48:11 -0700
- To: www-style@w3.org
- Message-ID: <20160422204811.GA17804@pescadero.dbaron.org>
So the spec for the currentcolor:
https://drafts.csswg.org/css-color-4/#currentcolor-color
says that currentcolor represents the value of the 'color' property.
The text-emphasis-color and text-decoration-color properties:
https://drafts.csswg.org/css-text-decor-3/#propdef-text-emphasis-color
https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration-color
use currentcolor as their initial value.
However, the compat spec introduces a -webkit-text-fill-color
property that overrides the color of text:
https://compat.spec.whatwg.org/#the-webkit-text-fill-color
which has proven to be needed for compatibily.  I believe Edge has
implemented it, and Gecko has an implementation and is working on
implementing the full set of changes needed to ship that
implementation.
In Chromium (and I presume WebKit, although I didn't test), the
-webkit-text-fill-color property also influences the color of
text-decorations.  See this test:
http://dbaron.org/css/test/2016/currentcolor
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).
How should this be handled?  I see a few options:
 (1) Say that the 'currentcolor' value has different meaning for
 text-decoration-color and text-emphasis-color, and for those
 properties uses '-webkit-text-fill-color' instead of 'color'.
 (2) Introduce a new value, such as 'current-text-color' or
 'current-text-fill-color' (maybe without hyphensโฝ) that is the
 initial value of 'text-decoration-color' and 'text-emphasis-color'.
Again, I wrote a few tests for this at:
http://dbaron.org/css/test/2016/currentcolor
although I think more could probably be added.
-David
-- 
๐   L. David Baron                         http://dbaron.org/   ๐
๐ข   Mozilla                          https://www.mozilla.org/   ๐
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)
Received on Friday, 22 April 2016 20:48:38 UTC