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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 08 Feb 2008 14:40:11 -0800
Message-ID: <47ACDA4B.4030506@inkedblade.net>
To: "Paul Nelson (ATC)" <paulnel@winse.microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>, Håkon Wium Lie <howcome@opera.com>

Paul Nelson (ATC) wrote:
> Conversely, the background could be changed to render from bottom to the top.
> Either way is fine with me as long as we are consistent.

Ok. If Opera agrees with that, I'll make the change. (I've already talked with
Konqueror's text-shadow implementor; he also suggests its more compatible with
Safari's interpretation of painting only the first shadow in the list.)

Håkon, can you please ask your devs about this?

> From an implementer's point of view it is easier to draw the list from beginning
> to end from bottom to top. That way I don't have to find out how many objects are
> in the list and paint from the end of the list to the beginning.

You can reorder the data when you parse it into the style structures; I assume
you don't reparse the string every time you need to paint. ;)

> Say you have four colors in a list; Red, Green, Yellow and Blue.
> Funny results when asking my wife what she expected.
> 1. if they were stacked on top of each my wife expected Red to be on top
> 2. if they were offset she expected to see the following color on top of the previous one.
> I guess herein lies the problem.

For multiple backgrounds we chose first == top for two reasons

   1. It's consistent with the idea of fallbacks in 'font' and 'content': if
      you're using opaque background images they do behave as fallbacks with
      the first item being the first choice. Where there are holes in the
      image (or in the font!), it falls back to the next in the list.

   2. You can stack the backgrounds visually in the source:

      background:  url(top-image.png),

Received on Friday, 8 February 2008 22:40:26 UTC

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