W3C home > Mailing lists > Public > www-style@w3.org > March 2002

Re[2]: W3C 'CSS3 module: Color' Working Draft dated 19th February 2002

From: Chris Lilley <chris@w3.org>
Date: Tue, 26 Mar 2002 16:53:53 +0100
Message-ID: <67356910890.20020326165353@w3.org>
To: www-style@w3.org, www-style-request@w3.org, fantasai <fantasai@escape.com>
On Tuesday, March 26, 2002, 8:00:39 AM, fantasai wrote:

f> Tantek Çelik wrote:
>> text-decoration-opacity

f> I think text-decoration can be fairly grouped with text, especially since it
f> doesn't have a separate color property, either. (And if there were separate
f> opacity properties, border and outline opacity could have an initial value of
f>  <foreground-opacity>, just as border-color has an initial value of <color>).

Provided it is made clear whether

a) text is drawn on top of underlines

b) text is drawn below underlines

c) text and underlines are combined into a single geometry and
rendered as one (unlikely but possible)

Same for strikethrough.

>> It is much simpler to introduce 2 new color value types which can then be
>> used with all properties that specify a color, rather than add 5-9 new
>> properties.

Until one considers animation, and DOM manipulation.

>> In addition, the new color value types permit controlling the opacity of
>> these pieces of elements independently of elements' children, which the
>> opacity property does affect.


f> Which shows the fundamental problem with declaring rgba and hsla the
f> solution to separating background and foreground opacity.

f> Suppose I have a <div>. I want the the <div>'s background to be translucent,
f> but it's text should be opaque so it's easily readable. It's a reasonable
f> request, no?

f> <div class="sidebar">
f>   <p>Paragraph text.... <a href="file.html">Link</a>... So <strong>DON"T
f>      FORGET...</strong> etc.
f>   </p>
f> </div>

f> Your suggestion would be to set the background as a transparent color. Thus:

f>   .sidebar {
f>       background: rgba(255, 255, 0, .5);
f>   }

f> Which works fine, except I also happen to have these rules in effect:

f>    :link, :visited {
f>       background: #FFBB00;
f>       color: #000033;
f>    }

f>    strong {
f>      background: #FF0000;
f>      color: #000000;
f>    }

f> So the background on the link and emphasized notice is opaque. This is not
f> according to my design,

It is - you specified an opaque color and that is what you got.

f> and IMO, it looks bad. So now I have to write separate
f> rules for any elements in a sidebar, adjusting the background color's opacity
f> accordingly.

Yes, you would have to adjust the color as well because the color and
the opacity are globbed together.  I agree it would be easier to just write

.sidebar {
       background: rgb(255, 255, 0);
       background-opacity: 0.5
.sidebar * { background-opacity: 0}

f> This isn't much of a problem if I only have to deal with sidebars,
f> and only with links and strong emphasis. However, using this approach with a
f> complicated stylesheet and a large variety of elements is inelegant and prone
f> to mistakes.


 Chris                            mailto:chris@w3.org
Received on Tuesday, 26 March 2002 10:55:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:01 UTC