Skip to content

:target-before and :target-after pseudo-classes #544

@danielsakhapov

Description

@danielsakhapov

WebKittens

No response

Title of the proposal

:target-before and :target-after pseudo-classes

URL to the spec

https://drafts.csswg.org/css-overflow-5/#active-before-after-scroll-markers

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

No response

Mozilla standards-positions issue URL

No response

WebKit Bugzilla URL

No response

Radar URL

No response

Description

These pseudo-classes match scroll markers that are, respectively, before or after the active marker (the one matching :target-current) within the same scroll marker group, as determined by flat tree order:

  • :target-before matches all scroll markers that precede the active marker in the flat tree order within the group.

  • :target-after matches all scroll markers that follow the active marker in the flat tree order within the group.

Resolved at w3c/csswg-drafts#11600

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions