Closed Bug 1966706 Opened 1 year ago Closed 1 year ago

Handle nested :has as a result of @scope

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Points:
2

Tracking

()

RESOLVED INVALID

People

(Reporter: dshin, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [at-scope-m2])

May already be handled, but one can do:

@scope(:has(~ .foo)) {
  :has(&) .bar { /*...*/ }
}

OTOH this should be fine (Though useless):

@scope(:has(~ .foo)) {
  :has(:scope) .bar { /*...*/ }
}

since :scope points to the exact matched element.

Points: --- → 2
Whiteboard: [at-scope-triage] → [at-scope-m2]

bug 1975531 may make this irrelevant, since & would map to :where(:scope)

See Also: → 1975531

CSSWG resolution means that this can't happen: https://github.com/w3c/csswg-drafts/issues/9740

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.