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

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

From: Steve Zilles <szilles@adobe.com>
Date: Tue, 19 Feb 2008 15:51:48 -0800
Message-Id: <>
To: www-style@w3.org
With respect to the order of compositing multiple text shadows and 
backgrounds, I had an action item to explore what happens in SVG. (The 
point being that consistency among related specifications is a good thing 
where it makes sense.)

Text shadows are done by "filters" in SVG. Filters provide an significantly 
more powerful (and complex) mechanism. There is one element in the filter 
mechanism, feMerge, that is used to composite a sequence of image layers, 
much like the compositing of backgrounds and text shadows. To wit, from the 
SVG 1.1 spec:
<http://www.w3.org/TR/SVG11/filters.html#feMerge>15.19 Filter primitive 

This filter primitive composites input image layers on top of each other 
using the over operator with Input1 (corresponding to the first 
child element) on the bottom and the last specified input, InputN 
(corresponding to the last 
child element), on top.

Many effects produce a number of intermediate layers in order to create the 
final output image. This filter allows us to collapse those into a single 
image. Although this could be done by using n-1 Composite-filters, it is 
more convenient to have this common operation available in this form, and 
offers the implementation some additional flexibility.

This usage supports back to front compositing which is consistent with the 
specification for text shadow in CSS 2.0 and inconsistent with that for 
background compositing.
Received on Tuesday, 19 February 2008 23:53:16 UTC

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