W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css4-images] element() and non-static children

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 29 Jul 2012 13:16:29 -0700
Message-ID: <CALRQH7_qEBD0g9q0sX+jyhjH9x3N-Bgv5BJZ9N_VwKSDo0z8bg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style@w3.org
On Sun, Jul 29, 2012 at 12:38 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Sun, Jul 29, 2012 at 12:04 PM, Andrew Fedoniouk
> <news@terrainformatica.com> wrote:
>> What is the z-index value of such element then?
>> Let's assume that element used in element() (let it be A element) is in
>> some container that has z-index:10 and the A element has children:
>> B with z-index:1 and C with z-index:20. What would be the rendering
>> order of this setup:
>> 1. B -> A -> C or
>> 2. A -> B -> C ?
>> (note that element A is position:static by itself)
> I don't understand the question.  You just draw it like normal.  The
> spec is very clear about how this works.

It's my turn then to ask: what "draw it like normal" means in this

Is your "normal" close to this:

For the purpose of element() rendering take rendering tree of the
whole document and render it in its normal order but skip all elements
that are not the element itself or are not its descendants (DOM).


This definition will cover positioned children with negative and positive

This statement here [1] :

"The image is constructed by rendering the referenced element and its

can be read as render the element and *then* its descendants.
Usually "render element" includes rendering of its content, that's why
my question.

[1] http://dev.w3.org/csswg/css4-images/#decorated-bounding-box

Andrew Fedoniouk.


>> And related question:
>> What if the element A has opacity:0.5? Will the rendering contain
>> pixels rendered by its containers? Or opacity shall be ignored as other
>> transformations?
> Again, you just render the element and its descendants over an
> infinite transparent backdrop.  You can't implement element() just by
> clipping out an already-rendered rectangle from the page (at least,
> not in general - you can probably often do so in practice).
> ~TJ
Received on Sunday, 29 July 2012 20:16:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:01 UTC