RE: [css3-text] Multiple Text Shadow Stacking Order

Paul Nelson wrote in reply to fantasai:

>> The text-shadow definition in CSS2 specifies that the first shadow
>> effect is on the bottom and the last one on top. This is inconsistent
>> with how multiple backgrounds work. Should we change it?
> 
> Shadows are painted from back to front.
> 
> http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index
> 
> > Boxes with the same stack level in a stacking context are stacked back-to-front according to document 
> tree order.


Agree totally.


> The definitions seem to be consistent. Can you provide an example for your point?
> 
> Paul


What Fantasai is asking is if it would be better to have the same order that each multiple text shadow is called as each multiple background image is called in comma separated strings like:

div {
  background: url(a.png) 0 0%, url(b.png) 100% 0, url(c.png) 100% 100%; /* top to bottom */
  text-shadow: 10px 10px 0 red,  19px 90px 0 blue,  100px 60px 0 yellow; /* top to bottom */
}


An author would find it easier (and more intuitive) to change text-shadow "red" and background "url(a.png)" since they both would occur first. In the specs for multiple backgrounds we have "The first image in the list is the layer closest to the user, the next one is painted behind the first." Text shadow should have the same order.


Alan

http://css-class.com/

Received on Friday, 8 February 2008 12:50:56 UTC