RE: [css3-text] Underlines match the color of the text (was Allow control of text-decoration width

At 01:29 -0400 4/8/11, Koji Ishii wrote:

>I understand there's a compatibility issue. But if matching 
>underline colors to the color of text is oftentimes desired 
>behavior, we could add another value to avoid compatibility issues 
>like this:
>
>   text-decoration-color: textColor
>
>I'm not sure if it's important enough to justify the cost, but both 
>Word and In Design behaving so makes me believe it is more common 
>than CSS 2.1 way.

    Here's a current workaround:

      * {text-decoration: inherit;}

WARNING: this may have unintended consequences in scenarios I haven't 
envisioned, and it can't really cover cases where a child has a 
decoration different than its parent's decoration and you want both 
decorations in the child's area to be the same color as the child.
    Still, it should cause any element with a parent that's been 
text-decorated to copy the decoration onto itself, and thus set the 
color of its new self-decoration to its own color.

-- 
Eric A. Meyer (eric@meyerweb.com)     http://meyerweb.com/

Received on Friday, 8 April 2011 21:05:34 UTC