Re: [css4-images] element() behavior

On Jul 31, 2012, at 9:31 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Wed, Aug 1, 2012 at 4:25 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> As written today, filters from ancestors are honored.  It may be
> better to change this, and ignore filters from ancestors, just like we
> ignore transforms from ancestors.
> 
> I think it's essential that all effects on ancestors (e.g. transforms, clipping, opacity, filters, masking) be ignored. Having some effects and not others be applied would be confusing and also very difficult to implement.

I agree. Iimagine that an ancestor of the element() target has transform: translate(100px, 100px). This should not affects the appearance of the target element when rendered as an image background via element().

However, I wonder if this doesn't conflict with our earlier decision that when you render the element(), it's as if you're starting painting from the root, but only painting the target element and its descendants. Things like filters etc. will create stacking context. So if the element() target has an ancestor with a filter, we paint its positioned descendants in their normal painting order (affected by the fact that the filter creates stacking context), but we don't actually apply the effect of the filter.

Simon

Received on Wednesday, 1 August 2012 17:50:25 UTC