W3C home > Mailing lists > Public > www-style@w3.org > February 2008

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

From: Alan Gresley <alan1@azzurum.com>
Date: Fri, 08 Feb 2008 05:23:59 -0700
To: "Paul Nelson \(ATC\)" <paulnel@winse.microsoft.com>
cc: www-style@w3.org
Message-ID: <20080208052359.34b83c2f3c9bef00757a2c62c0fb7450.eec9a463e7.wbe@email.secureserver.net>

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.


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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:33 UTC