- From: Eric A. Meyer <eric@meyerweb.com>
- Date: Fri, 29 Oct 2004 10:53:17 -0400
- To: www-style@w3.org
At 12:59 +0200 10/28/04, Jens Brueckmann wrote: >On Thu, 28 Oct 2004 10:51:57 +1000, Lachlan Hunt ><lachlan.hunt@iinet.net.au> wrote: > >> This is in response to Hixies latest log entry, "Multiple >>Background Images" http://ln.hixie.ch/?start=1098915335&count=1 >> >>> Given the following hypothetical CSS3: >>> body { background: url(foo) url(bar); } >>> Which background is painted on the bottom, and which is painted >>>on the top? >> >> I couldn't find any other property that would set a precedent for >>this decision, but I think it would be most logical if they were >>painted from top to bottom, in the order they appear. ie. in the >>example, foo would be painted on top of bar. > >Considering usual stacking order I would rather interpret it the >other way round, foo at lowest level, followed by bar and any other >image in order of appearance, much like layers are added on top of >each other in image editing software. Your proposal would make the behavior of background images conceptually inconsistent with font family ordering. In font families, the "top choice" comes first, followed by alternate choices. I suspect most authors would expect the same sort of behavior with background images: the "top choice" comes first, and then "lower" choices follow in order. One possible use for this ability is that the author could define three or four images for the background, from most advanced to least, thus intentionally using the multiple-image ability as a fallback mechanism. In other words: body {background: url(bg.svg), url(bg.png), url(bg.gif) 0 0 repeat;} Reverse the order, and then authors have to remember that fonts go from first choice to last choice, but backgrounds go from last choice to first choice. I'll grant you that the cases are not totally analogous, since font are an all-or-nothing deal whereas backgrounds could be layered together, but I still think they should behave as similarly as possible. -- Eric A. Meyer (eric@meyerweb.com) http://www.meyerweb.com/eric/ Principal, Complex Spiral Consulting http://www.complexspiral.com/ "CSS: The Definitive Guide," "CSS2.0 Programmer's Reference," "Eric Meyer on CSS," and more http://www.meyerweb.com/eric/books/
Received on Friday, 29 October 2004 14:53:31 UTC