-
Notifications
You must be signed in to change notification settings - Fork 2.9k
CSS content-visibility content relevancy section should be in the HTML spec. #11210
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
Comments
Also last remembered sizes I suppose: https://drafts.csswg.org/css-sizing-4/#last-remembered |
See w3c/csswg-drafts#7659 about the timing for setting last remembered sizes |
For content-visibility, right before step 15 makes sense to me. I'm agnostic as to whether this text should be in HTML. I have a slight preference in keeping all of the elaborations in css-contain-2. Maybe we can add an exported name in HTML and reference that in CSS instead of hardcoding step numbers? (Thanks to @dbaron for that suggestion) |
Thanks for the input on the location! In general we prefer not to have monkey patch specs. See https://annevankesteren.nl/2014/02/monkey-patch and https://w3ctag.github.io/design-principles/#monkey-patching . So it's quite inappropriate to have CSS modify the HTML rendering steps, and we definitely need to move it. |
One thing we can do though is export a somewhat generic name from |
Partially fixes whatwg#11210
So I went for something like w3c/csswg-drafts#12105, but I'm not sure I agree on what would be the right place to call this in HTML. In particular, it seems this would need to happen after the first layout to be deterministic, right? Otherwise whether an element has So this should probably happen around where we do the proximity to the viewport determination... Do you agree @noamr @vmpstr? Or how does Blink deal with this? Something like tweaking that algorithm to be something like w3c/csswg-drafts@d4c4952, and the HTML spec to do something like #11241 which I just submitted. Once we're clear on the approach here I need to write some tests of course... |
cc @fred-wang too, since he may also be familiar with the topic. |
What is the issue with the HTML Standard?
https://drafts.csswg.org/css-contain/#cv-notes has:
However run the animation frame callbacks is now step 14, and there's step 15 which takes care of updating style and layout and so on, along with ResizeObserver.
I think this should probably happen either right before that loop in step 15, or inside that loop. But it should happen in the HTML step so it doesn't get out of sync and all these steps are well defined...
Any strong opinions? Maybe once per frame at the beginning of that loop is alright.
cc @vmpstr @noamr @Loirooriol @mrobinson
The text was updated successfully, but these errors were encountered: