w3c / w3c/csswg-drafts

[selectors] Time dimensional pseudo-classes that get a selector list as arguments are weird.

Open
#9,748 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://drafts.csswg.org/selectors/#time-pseudos describes syntax like :current(<compound-selector-list>).

I might be missing something, but is there any reason why this can't be a regular (argument-less) pseudo-class? That is, is there any reason why :current(foo, bar) would be different from :is(foo, bar):current?

If not, is there any reason for this extra complexity? It seems that the :current pseudo-class can be expressed in terms of a chain, much like :hover / :active or what not.

cc @tabatkins who wrote most of the spec text I believe.

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

Read the Selectors Level 4 time-pseudos section linked in the issue, then compare its :current() syntax with the proposed :is(foo, bar):current form. Determine whether the distinction is intentional and document the resolution or update the relevant spec text accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.