web-platform-tests / web-platform-tests/interop

CSSPseudoElement

Open
#1,347 4 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

focus-area-proposal
Dominant language
JavaScript
Stars
524
Forks
35
Avg merge
1d 4h
Merged PRs (30d)
10

Description

Description

A very good and detailed explainer for CSSPseudoElement can be found here.

For Interop 2027, it would be great to have this available cross-engine. It is currently only available in Chromium and behind a flag in Firefox.

My primary motivation is for the ::backdrop pseudo element. Currently to detect backdrop clicks, it requires elaborative hacky workarounds such as event.target, getBoundingClientRect(), extra divs etc. They shouldn't be needed.

Example

dialog.addEventListener('click', (event) => {
  if (event.pseudoTarget?.type === '::backdrop') {
    dialog.close();
  }
});
Specification

W3C

web-feature

https://github.com/web-platform-dx/web-features/issues/4306

Test Links
Additional Signals

Contributor guide

No contributing guide indexed for this repository

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 by reading the CSSPseudoElement explainer, the MDN page, and the linked W3C UI Events and CSSWG discussions. Run the linked WPT results for CSSPseudoElement and backdrop-pseudo-element-click.tentative.html, then use the standards-position links to understand cross-engine status; done means the feature is available across the relevant engines and the backdrop-click test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
testing-qa, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.