-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-contain-2][inert]: inert and hidden containments should share common logic #7703
Comments
I don't see how inert and The optimizations for BTW, https://drafts.csswg.org/css-contain/#cv-a11y says that contents of |
@Loirooriol I'm tracking the performance issues with Chrome here: https://bugs.chromium.org/p/chromium/issues/detail?id=1360404 I am probably putting the cart before the horse a bit with my explainer. The problem is I don't see any implementation of inert being reasonable from a performance viewpoint with all the tree-walking that is required for set Nothing in |
Inert can't be treated as |
@Loirooriol Thanks. Maybe I'm not explaining it clearly. it's not a matter of making inert treated as If all
Or a shared base type:
But the rules in spec for Diagrams: |
I apologized. I misunderstood the That means this is would be strictly a language clarity change, not functionality change. Still, saying |
I'm talking about these two specifications:
https://html.spec.whatwg.org/multipage/interaction.html#inert
https://drafts.csswg.org/css-contain/#skips-its-contents
inert
seems very similar to the conditions for [css-contain] skip its contents. It seems as though these terms may be able to joined. It may also allow expression of inertness over CSS rules with something likecontainer-visibility: inert
.The reason behind this is because when
HTMLDialogElement.showModal()
was implemented, none of the optimizations as we see incontainer-visibility
were available at the time. All modern browsers (eg: Chrome, FireFox, Safari and Edge) all perform heavy restyle calculations on#document
. This is likely becauseinert
will update interactive elements as:disabled
. This causes real-world implementation ofHTMLDialogElement.showModal()
to be questionable. IfshowModal()
will guarantee frame drops on average sized DOM heavy pages on average consumer devices, then it's unlikely to be adopted in practice. If browsers are to target this performance issue, being able to use the already optimized procedure ofcontainer-visibility
may prove helpful.The challenges between both are figuring things such as:
content-visiblity: hidden
is a requirement, should it also be a requirement ofinert
, instead of its current state of optional?Some solutions:
inert
andcss-contain
reference that.inert
optimally, if at all.The text was updated successfully, but these errors were encountered: