bryanmcquade / scroll-to-css-selector

Explainer for supporting CSS selectors when navigating to a URL fragment
61 stars 1 forks source link

Pseudo-class and pseudo-element selectors #8

Open nemzes opened 6 years ago

nemzes commented 6 years ago

Some pseudo-classes (:first-child, :nth-child…) make perfect sense as target selectors. Others, not so much: :valid, :hover, :lang().

Likewise, most pseudo-elements don't work well as targets (::before, ::after), but we could argue that some do (::first-line, ::first-letter).

Should the scroll-to-selector syntax be limited to support only a subset of these selectors?