Re: [css-transforms] CSS3D breaks with opacity flattening

On Sun, Sep 18, 2016 at 3:38 PM, Matt Woodrow <mwoodrow@mozilla.com> wrote:
> Can we instead solve this by applying the opacity to the group in the final
> coordinate space (at the root of the 3d context) rather than at the local
> coordinate space where the opacity is set?

No, as I explained in more detail in the GitHub thread I linked
<https://github.com/w3c/svgwg/issues/264#issuecomment-246750601>, this
is a logical consequence of 'opacity' and other filter-type effects
being "group effects".  If you want the effect to only apply to the
leaves, you can do that yourself by specifying it on the leaves, but
it has a visibly different effect than doing it "as a group".

[snip]
> Obviously this would prevent depth sorting occurring between elements inside
> and outside of 'b', and we need to figure out how to depth sort 'b' itself
> (given that it is an atomic entry for sorting, but isn't a 2d plane), but
> those seem solvable.

That's actually the core problem preventing this from working; it's
not a detail we can just paper over later.

> I think the logical concept of wanting to apply group opacity to a set of
> elements (an 'object') before positioning that object into the higher level
> 3d scene is a reasonable one, and we should try support it if possible.

It is, unfortunately, logically impossible to do so.  The best that
can be achieved is an extreme level of hack, where you apply opacity
to the individual children, and then apply clip masks to the "further
back" elements that *simulates* the effect of being occluded by the
elements in the front.

~TJ

Received on Monday, 19 September 2016 06:28:30 UTC