- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Tue, 22 Jan 2008 17:05:51 -0500
- To: David Hyatt <hyatt@apple.com>
- CC: www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
David Baron wrote: > > It sounds like you want all the shadows for an element to be painted > at the same layer, so you should say that the text shadow for an > element is painted (for all the text within it, including text > inside descendant elements) in a layer after (above) its border and > background, but for each text by the parent element of the text (so > that the shadow moves with relative positioning). That would work if text-shadow, like text-decoration, didn't inherit. But last time we discussed it, we decided to make it inherit. I guess that makes it easier to understand and implement, but harder to get the overlapping edge cases right. David Hyatt wrote: > > In WebKit, we don't really have any control over when the shadow > paints. It is drawn as a side effect of another drawing operation (in > this case the drawing of the text itself). Therefore it is not drawn by > the parent element for us. It's drawn by the same operation that draws > the text glyphs. > I'd kind of prefer that this paint order either match what we do or > remain unspecified, since we really don't have any choice here. > > It's important to understand this concept that shadows are a byproduct, > cast by an actual drawing operation. It's just sensible graphics API > to have the shadow drawn at the same time the actual drawing operation > occurs so that the antialiasing etc. can be handled smoothly where the > shadow meets the glyphs. > > I think we might be able to clip out the glyphs and draw (i.e., the hack > we did for box-shadow), but that would probably look bad at the edges of > the clip (as box-shadow looks bad today in WebKit). Ok, I've added the following text: # The shadow must be painted behind the element's text but in front of # its visible background. UAs should avoid painting text shadows over # text in adjacent elements belonging to the same stack level and stacking # context. Does that make sense? ~fantasai
Received on Wednesday, 23 January 2008 06:47:25 UTC