W3C home > Mailing lists > Public > www-style@w3.org > May 2013

[css-text-decor-3] Is handling of no-<color> text-shadow for text decorations intentional?

From: L. David Baron <dbaron@dbaron.org>
Date: Mon, 6 May 2013 23:06:54 -0700
To: www-style@w3.org
Message-ID: <20130507060654.GA12536@crum.dbaron.org>
http://dev.w3.org/csswg/css-text-decor-3/#text-shadow-property
specifies how to handle the omission of <color> only by reference to
http://www.w3.org/TR/css3-background/#the-box-shadow , which says
that when the <color> part of a shadow is omitted, the 'color'
property is used.

In Gecko, which I believe implemented text-shadow before this was
specified, we instead shadow the color that was drawn.  For text,
this yields the same result, but for text decorations, it yields a
different result.

Compare, for example, the following:
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Abody%20%7B%20text-decoration%3A%20underline%3B%20color%3A%20green%20%7D%0Ap%20%7B%20color%3A%20blue%3B%20text-decoration%3A%20overline%20%7D%0Aspan%20%7B%20text-shadow%3A%201em%201.4em%2C%202em%202.8em%20silver%3B%20color%3A%20maroon%20%7D%0A%3C%2Fstyle%3E%0A%3Cp%3E%3Cspan%3Ehello%3C%2Fspan%3E
in both Chrome (follows current spec) and Firefox.

Is this choice of behavior intentional?  If not, which is
preferable?

If this is intentional/preferable, I think the spec should have a
note that notes that in this case, the color of the shadow might be
different from the color of the decoration even though it is the
same as the color of the text.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 7 May 2013 06:07:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 7 May 2013 06:07:18 UTC