Re: [csswg-drafts] [css-view-transitions-1] Where is “effects” defined? (#9139)

So I think this is trying to hook into a process that's unfortunately not fully written down clearly.  It's sort of specified vaguely across a few places that spell out pieces of it:

https://drafts.fxtf.org/filter-effects-1/#placement
https://drafts.fxtf.org/filter-effects-1/#FilterProperty
https://drafts.fxtf.org/css-masking-1/#placement
https://drafts.fxtf.org/compositing-1/#compositingandblendingorder
https://www.w3.org/TR/SVG2/render.html#Grouping

In essence this model describes a sequence of operations that happen in a particular order whenever an element that establishes an isolated group (which is at least somewhat defined in https://drafts.fxtf.org/compositing-1/ ) is being drawn:
 1. drawing of descendants into the element's canvas
 2. `filter`
 3. `clip` / `clip-path` / `mask` / `opacity`
 4. `transform`
 5. draw into parent/ancestor group while applying `mix-blend-mode` and compositing

(At least, I think that's what the spec is saying, and I hope it's correct!) 

I think this should be specified more clearly in a painting model spec (see #4965).  Also note that https://drafts.fxtf.org/compositing-1/#csscompositingrules_CSS does specify that anything that establishes a stacking context establishes an isolated group.

I think maybe the essence of what the view transitions spec should be saying is that the capture gets inserted between steps 3 and 4 above in the process of rendering the element itself (into an isolated group).  This implies that all of the descendants are rendered normally (with the caveat that the view transition element is a backdrop root, as the spec already notes).  I think this logic would also imply that `mix-blend-mode` on the element itself would be ignored in a way similar to the way `transform` is when computing the capture.  (I think it's worth checking whether that's already what the Chromium implementation does.)

If that makes conceptual sense, I think another question is then how to write it in spec language between the above cited section and perhaps also fitting some of it in https://drafts.csswg.org/css-view-transitions/#named-and-transitioning , to which it is closely related.

I'd also note that I think @chrishtr knows these property interactions better than I do, and may have ideas here.

-- 
GitHub Notification of comment by dbaron
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9139#issuecomment-1672101834 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 9 August 2023 20:28:27 UTC