Re: [csswg-drafts] [css-view-transitions-1] Simplify definition of hit testing during "rendering suppression for view transitions" (#10045)

> Is there a place where the rest of this mode is defined? So far I only saw the hit testing definition.

yes, in the html spec [here](https://html.spec.whatwg.org/#event-loop-processing-model:rendering-suppression-for-view-transitions). The browser should not render any frames after caching the old state and before the update callback is done or there is a timeout.

> I guess you could have *:not(:root) { pointer-events: none !important } where !important prevents the rule from getting overridden?

That CSS should work! So we could consider it if we wanted a UA CSS way to do this.

I still worry that it might surprise authors to see the computed style being different that way. We've generally tried to avoid changing the computed style of author DOM. Another similar hit testing override during the animation phase except for the tagged elements is also defined : When a [Document](https://dom.spec.whatwg.org/#document)'s [active view transition](https://drafts.csswg.org/css-view-transitions-1/#document-active-view-transition)'s [phase](https://drafts.csswg.org/css-view-transitions-1/#viewtransition-phase) is "animating", the boxes generated by any element in that [Document](https://dom.spec.whatwg.org/#document) with [captured in a view transition](https://drafts.csswg.org/css-view-transitions-1/#captured-in-a-view-transition) and its [element contents](https://drafts.csswg.org/css-contain-2/#element-contents), except [transition root pseudo-element](https://drafts.csswg.org/css-view-transitions-1/#viewtransition-transition-root-pseudo-element)'s [inclusive descendants](https://dom.spec.whatwg.org/#concept-tree-inclusive-descendant), are not painted (as if they had [visibility: hidden](https://www.w3.org/TR/css-display-3/#propdef-visibility)) and do not respond to hit-testing (as if they had [pointer-events: none](https://drafts.csswg.org/css-ui-4/#propdef-pointer-events)).

The above one is harder to do via CSS because UA CSS doesn't have a way to say "set this style for elements participating in a transition". So I feel like for consistency it might be better to do this without overriding styles.

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


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

Received on Friday, 8 March 2024 00:21:41 UTC