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

Bert Bos wrote:
> 
> fantasai writes:
> >
> > So the background on the link and emphasized notice is opaque.
> > This is not according to my design, and IMO, it looks bad. So now
> > I have to write separate rules for any elements in a sidebar,
> > adjusting the background color's opacity accordingly. This isn't
> > much of a problem if I only have to deal with sidebars, and only
> > with links and strong emphasis. However, using this approach with
> > a complicated stylesheet and a large variety of elements is
> > inelegant and prone to mistakes.
> 
> Good point. On the other hand, maybe you *do* want to have your links
> opaque, because they don't stand out nearly as much when the
> background is blended. And maybe the sidebar has 'background:
> rgba(255,0,0,0.5)' and you need a new rule for strong inside a sidebar
> anyway.
> 
> You also seem to assume that the background of the link *replaces* the
> background of the sidebar, rather then lie on top of it (i.e., red
> blended with the window background). 

I forgot about the color blending.
So specifying opacity via rgba/hsla isn't even a viable workaround for
this.

> Or at least that 'background-opacity' would inherit (i.e., red blended
> with yellow and with the window background).

I assumed that, within the background layer, background-opacity behaves
the same as opacity.

 | Opacity can be thought of conceptually as a postprocessing operation.
 | Conceptually, after the element is rendered into an RGBA offscreen
 | image, the opacity setting specifies how to blend the offscreen
 | rendering into the current composite rendering. 
...
 | The opacity property is applied across an entire element including its
 | outline, border and background if any. If the element is a container
 | element, then the effect is as if the contents of the element were
 | blended against the current rendering composite using a mask where the
 | value of each pixel of the mask is <alphavalue>. 

If I am understanding this correctly, there would not be more color
blending than I bargained for, and I would not need to assume that
background-opacity inherits.

~fantasai

Received on Sunday, 14 April 2002 21:19:29 UTC