Re: [csswg-drafts] [css-view-transitions-1] Should isolation and plus-lighter blending be applied conditionally (#7814)

Discussed this offline again, the summary above is great. Adding what came up at the last discussion.

Option 2 will need to be done anyway for cases like [this](https://developer.chrome.com/docs/web-platform/view-transitions/#transitioning-without-freezing). In this case the author is adding `view-transition-name` for elements in both the old and new DOM, since they want a size/transform animation. But they're setting `opacity: 0` on the old image because the content hasn't changed. In fact they want the live animating new image instead of a cross-fade. In this case the engine will set up all the isolation and mix-blend-mode styles for cross-fade anyway and would have to detect that only image is actually being rendered so this blending can be optimized.

The worry is still that while the UA can optimize the default entry/exit transitions, authors might add styles (like `background`) which will require the expensive blending without realizing it. Since it comes from rules in the UA CSS. On the flip side, if normal blending is incorrect for them, they would discover that and add the requisite blend-mode/isolation (same as the regular DOM rendering).

So the proposal is to go with option 1. This is also in the spec already [here](https://drafts.csswg.org/css-view-transitions-1/#:~:text=Set%20capturedElement%E2%80%99s%20image%20pair%20isolation%20rule%20to%20a%20new%20CSSStyleRule%20representing%20the%20following%20CSS%2C%20and%20append%20it%20to%20document%E2%80%99s%20view%20transition%20style%20sheet). Adding this for async resolution.

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


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

Received on Thursday, 6 April 2023 21:07:08 UTC