W3C home > Mailing lists > Public > www-style@w3.org > November 2007

[css3-text] text-shadow to accept foreground color

From: Ognyan Kulev <ogi@fmi.uni-sofia.bg>
Date: Wed, 07 Nov 2007 12:03:21 +0200
Message-ID: <47318D69.5080705@fmi.uni-sofia.bg>
To: www-style@w3.org

Hi,

One of the problems with text-shadow is with glow effect where text 
color and background are same:

span.glow {
     background: white;
     color: white;
     text-shadow: black 0px 0px 5px;
}

When UA doesn't support text-shadow, the text is not visible. Possible 
solution is to have optional text color as first item in text-shadow list:

none | [<color>, ]? [<shadow>, ] * <shadow>

<color> can't be mistaken with <shadow>.

The above example will look like (with fallback to black text color):

span.glow {
     background: white;
     color: black;
     text-shadow: white, black 0px 0px 5px;
}

In addition to change in "Value:", I propose the following text to 
replace the first sentence:

"This property accepts a comma-separated list of shadow effects to be 
applied to the text of the element."

with

"This property accepts a comma-separated list of shadow effects to be 
applied to the text of the element, optionally preceded by <color>. If 
<color> is specified, it is used as foreground color overriding what is 
specified with 'color' property."

Regards,
Ognyan Kulev
Received on Wednesday, 7 November 2007 10:05:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:56 GMT