w3c / w3c/csswg-drafts

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

Open
#7,528 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

css-sizing-4
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CSS Sizing 4 #last-remembered definition and compare its cited Resize Observer target wording. Resolve how pseudo-elements should be described, then update the definition or add the proposed note; done when the text clearly states whether pseudo-elements can have a last remembered size.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.