w3c / w3c/csswg-drafts

[web-animations-1] Reject old-style `:before` pseudo-element syntax

Open
#4,472 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

web-animations-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Background is the discussion in #4437.

As of that change, KeyframeEffect now has a pseudoElement member whose syntax is defined by Selectors Level 4.

That definition requires UAs to accept the old single colon syntax (:before) as well as the double colon syntax (::before).

I was under the impression we wanted to phase that historical artifact out of the web platform so that new APIs like this should reject :before and only accept ::before.

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 with the discussion in issue #4437 and the KeyframeEffect.pseudoElement definition, then compare its syntax reference with the Selectors Level 4 pseudo-element syntax. Done means the specification clearly requires rejecting single-colon :before while accepting the double-colon form ::before.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
api, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.