- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Tue, 8 Sep 2009 09:06:31 -0700
- To: L. David Baron <dbaron@dbaron.org>
- Cc: www-style list <www-style@w3.org>
On Sep 8, 2009, at 8:26 AM, L. David Baron wrote: >> However, “Layering multiple background images” doesn't seem to >> mention >> 'background-clip'. I think it should say something like the >> following: >> >> Regardless of how many background images are used, the box has >> only one >> background painting area, as defined by the ''background-clip' >> property. >> The background color, if present, is painted in this area, below >> all of >> the other layers. > > I'm not convinced that there's anything inconsistent about the > current spec; "sized, positioned, and tiled" could include the > effects of background-clip. And the current spec is certainly clear > that background-clip takes multiple values, since it says: > Value: [border-box | padding-box ] [ , [border-box | padding-box ] ]* > This is what Gecko has implemented. Hmm. Here I thought I was just clarifying something that was inadvertently omitted. I see now that the working draft [1] specifically mentions background-clip as part of what can be part of the list of backgrounds, but the editor's draft [2] does not (in fact, the editor's draft is more vague there). It looks as though this was changed in the editor's draft. There, 'background-color' only takes one value [3], and "[the] background color, if present, is painted below all of the other layers." [2] > If you want to change background-clip to have only a single value > rather than separate values for each layer, you also need to change: > * the syntax of background-clip itself I think you are right. How can 'background-clip' take multiple values, if 'background-color' only has one, and is supposed to be drawn on a single layer behind all the multiple image layers? Would it use the lowest layer's background-clip? Or the outermost of all the background clips? I think there is no real use case for multiple background-colors (which I imagine is why it was removed), and I don't really see much of one for multiple clippings of background images either. If there is only one background-color, then I think there should be only one 'background-clip'. It would be simpler to just have one clipping, and would fit nicer with a drop-shadow proposal I am working on. > * the rules for the 'background' shorthand Yes, it currently says that the 'background-origin' value can also change the 'background-origin' clip.[4] [1] http://www.w3.org/TR/2008/WD-css3-background-20080910/#layering [2] http://dev.w3.org/csswg/css3-background/#layering [3] http://dev.w3.org/csswg/css3-background/#the-background-color [4] http://dev.w3.org/csswg/css3-background/#the-background and http://www.w3.org/TR/2008/WD-css3-background-20080910/#the-background
Received on Tuesday, 8 September 2009 16:07:19 UTC