[css3-text] Proposal: specifying text-shadow and color in the same rule

Hello,

The text-shadow property suffers from an important limitation, a 
degradation problem, when you set the text-color to be the same as the 
background color, and set a shadow. The effect can be seen here, in the 
fith and sixth examples ("I, Augustus" and "a cat, an apple, etcetera"):
    http://www.w3.org/Style/Examples/007/text-shadow.html

When "color" and "background-color" are the same, and the author relies 
on a shadow to show to make the text readable, the text becomes 
unreadable on browsers that do not support text-shadow.

In this particular case, a simple solution can solve the problem : being 
able to specify the shadow and the color in the same rule. Let's say the 
acceptable value for text-shadow becomes something like that :
    none | [<color> /] [<shadow>, ] * <shadow>

The following rule :
    text-shadow: black / white 0 0 5px;

Would be equivalent to
    color: black;
    text-shadow: white 0 0 5px;

Thus, either color and shadow are set, or the rule is wholly ignored.

Actually, the same thing has already been proposed long ago in a 
previous mail, that got no reaction :
    http://lists.w3.org/Archives/Public/www-style/2007Nov/0088.html
Though this mail proposed a slightly different syntax (a comma 
separating the color from the shadows instead of a slash), it is the 
same proposal.

Regards,
Jordan OSETE

Received on Monday, 29 September 2008 19:31:07 UTC