Re: [css3-background] number of layers should consider background-origin and background-clip

L. David Baron wrote:
> http://dev.w3.org/csswg/css3-background/#layering says that the
> number of background layers considers the background-image,
> backgroundrepeat, background-size, and background-position
> properties, but not the background-clip and background-origin
> properties.
> 
> I think the number of layers should consider either (a) all six
> properties or (b) only background-image.
> 
> Furthermore, the statement about interpreting each of the properties
> as though it has a certain number of values should refer to all six
> properties.

I agree it should be all or nothing. And I don't think the layerable
properties should be listed in a separate section, I think each property
should say on its own that it affects the layering.

But really, I think it makes the most sense for only background-image
to create layers. Because I can totally see something like this happening:

.classA {
   background: url(topleft.png) top left,
               url(bottomright.png) bottom right,
               url(topright.png) top right,
               url(bottomleft.png) bottom left;
   background-repeat: no-repeat;
   ... other stuff ...
}

#foo {
   background-color: silver;
   background-image: url(matte.png);
   background-repeat: repeat;
}

<div class="classA" id="foo" will have four layers. Authors aren't going
to realize that the background shorthand is the only thing that will
reliably unset all the layers.

Also, if we add another layerable background-foo property in the future
it can break rendering on existing pages through this phenomenon: an
explicit list of all background properties will no longer reset the layers.

~fantasai

Received on Tuesday, 9 December 2008 02:04:53 UTC