RE: [css3] support for filters

> [1] so I have argued that the same should apply for box-shadow
There is a good description of this on http://www.bradclicks.com/cssplay/drop-shadow/Drop-Shadow.html

The name 'box'-shadow does imply that you're adding a shadow to an element's bounding box so drop-shadow is probably what you're looking for...

> [2]. I don't agree that a shadow of a parent element should cast a shadow upon it's children (wouldn't make sense) but I
> do believe the shadow of a parent element should be seen through the background of the parent or children if they have semi-transparent backgrounds.
True. When you apply a filter to an element, you need to create a bitmap of the element and all its children. Then you calculate the shadow using this bitmap.
Then the shadow bitmap is put on the stage followed by the original bitmap. (The element with the filter is called an isolated group in PDF speak).
With this approach the children won't cast shadows on each other but they will interact with the shadow if they contain opacity.

>> Text-shadow probably was introduced to work around that issue.
> What issue?
The issue that box-shadow only adds a shadow to an element's box and not to its content.

Rik

-----Original Message-----
From: Alan Gresley [mailto:alan@css-class.com] 
Sent: Wednesday, January 05, 2011 8:48 PM
To: Rik Cabanier
Cc: Simon Fraser; Cameron McCormack; Charles Pritchard; ed@opera.com; www-style@w3.org
Subject: Re: [css3] support for filters

On 6/01/2011 12:51 PM, Rik Cabanier wrote:
> Box-shadow doesn't suffice because it shadows the outside box, not the 
> content within it (unless I'm reading the spec wrong).

This is correct somewhat. I don't agree with the current spec on box-shadow since the shadow in text-shadow does show through transparent glyphs [1] so I have argued that the same should apply for box-shadow [2]. I don't agree that a shadow of a parent element should cast a shadow upon it's children (wouldn't make sense) but I do believe the shadow of a parent element should be seen through the background of the parent or children if they have semi-transparent backgrounds.


> Ie if you
> have a div with several elements, it would add a shadow to the bounds 
> of the div and not the individual elements.


Yes I think. Lets be clear that about this. A shadow is cast onto an element that is lower in the painting order. A shadow can be seen through a transparent background in real life as well as in a svg document.

<http://css-class.com/test/svg/shadow-transparent-background.svg>


This effect is seen in Firefox 3.6.13 and Opera 11. This should be possible with CSS.



> Text-shadow probably was introduced to work around that issue.
>
> Rik


What issue?


1. <http://css-class.com/test/css/shadows/text-shadow2.htm>
2. <http://lists.w3.org/Archives/Public/www-style/2008May/0194.html>


-- 
Alan http://css-class.com/


Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo

Received on Thursday, 6 January 2011 05:14:27 UTC