- From: David Hyatt <hyatt@apple.com>
- Date: Wed, 19 Dec 2007 12:12:56 -0600
- To: Brad Kemper <brkemper@comcast.net>
- Cc: John Oyler <johnoyler.css@gmail.com>, www-style@w3.org, fantasai <fantasai.lists@inkedblade.net>
Text-shadow is shadowing some actual drawing. Box-shadow, though, is just a decorative effect around the edges of a box. I don't think they are that similar (other than syntactically). Possible new properties that would shadow actual drawing and that would behave more like text-shadow include: shadow - Shadow all drawing done by the object and its descendants. border-shadow - Shadow actual border drawing (would get messy at border corners just as RGBA overlap does) background-shadow - Shadow actual background drawing (this would do more what you want with a partially transparent background for example, since the shadow would show through the transparency) dave (hyatt@apple.com) On Dec 19, 2007, at 12:07 PM, David Hyatt wrote: > On Dec 19, 2007, at 9:54 AM, Brad Kemper wrote: > >> Well, I guess that is the big question. Personally, I think most of >> the time I wouldn't mind having the show continue fully under the >> box, but it might be useful at times to turn that off, perhaps with >> an extra parameter to box-shadow to say if that it is knockout >> (defaulting to "not"). >> > > We can't implement the other way. Shadows in CoreGraphics are > drawn as a side effect of another drawing operation. You "turn on" > shadows in the graphics context, do some drawing, and a shadow is > cast by whatever you draw automatically. This means that in order > to implement box-shadow, we actually have to do a fill rect > operation. The only way to show only the shadow and not the fill is > to set a clip that prevents the area occupied by the fill from being > drawn into. > > For a fully transparent box, there is no shadow to be cast, since > there is no fill, and the shadow is inside the area occupied by any > fill that we would do in order to get the shadow to draw in the > first place. > >> It is interesting to note that when combining text-shadow with >> opacity that the shadow does not show through the letters. It does >> seem as though there should be some consistency between the text- >> shadow and box-shadow. >> > > It's not supposed to. opacity blends everything inside the layer > after the fact as a single unit. so I think this is not a very good > example to bring up. > > If you did RGBA text with text-shadow, then you would see the shadow > behind the letters. > > dave > (hyatt@apple.com) >
Received on Wednesday, 19 December 2007 18:13:13 UTC