Re: [CSS3 Text] shadow stacking levels

David Hyatt wrote:
> 
> On Jan 22, 2008, at 4:05 PM, fantasai wrote:
> 
>> 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?
>
> You should cut the last sentence.  The rest is about as specific as I 
> think you want to get.
> 
> <span>Hello</span><span style="margin-left:-20px;">world</span>
> 
> In the above example, if I put a text-shadow on the span with the 
> negative margin, the shadow is going to overlap the text in the previous 
> adjacent span, since the text already overlaps.
> 
> Even ignoring this issue, like I said before, in our implementation the 
> shadow draws at the same time as the text.  It is a byproduct of the 
> text drawing operation.  Even without the negative margin, an offset 
> could be specified that has the shadow of the second span drawing on top 
> of the text in the first span.

Yes, that second effect is something I think UAs should be encouraged to
avoid. Putting an invisible element boundary in the text shouldn't cause
the shadow to, for no visually apparent reason, stack over preceding text.
I understand that doesn't work nicely in your implementation; that's fine,
that's why it's a should and not a must.

~fantasai

Received on Wednesday, 23 January 2008 16:20:20 UTC