Skip to content

[css-sizing] Clarify "elements capable of being ResizeObserver targets" #7528

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

Open
Loirooriol opened this issue Jul 23, 2022 · 0 comments
Open

Comments

@Loirooriol
Copy link
Contributor

From https://drafts.csswg.org/css-sizing-4/#last-remembered

Only elements capable of being ResizeObserver targets can have a last remembered size.

This is confusing because the Resize Observer spec seems to allow all elements. CSS Sizing is actually referring to pseudo-elements, but pseudo-elements aren't actually elements, e.g. a property with "Applies to: all elements" doesn't apply to pseudo-elements unless otherwise stated, like ::before and ::after explicitly do.

So I would instead say

Only actual elements capable can have a last remembered size, pseudo-elements can't.

Or if you want to keep handwaving pseudo-elements as elements, at least add a note

Only elements capable of being ResizeObserver targets can have a last remembered size.
Note: Therefore, pseudo-elements can't have a last remembered size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant