Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify that the universal selector does not match pseudo-elements (m…
…dn#41958)

* Clarify that the universal selector does not match pseudo-elements directly

* Update files/en-us/web/css/reference/selectors/universal_selectors/index.md

Co-authored-by: Chris Mills <[email protected]>

* Update files/en-us/web/css/reference/selectors/universal_selectors/index.md

Co-authored-by: Chris Mills <[email protected]>

---------

Co-authored-by: Chris Mills <[email protected]>
  • Loading branch information
codersjj and chrisdavidmills authored Nov 17, 2025
commit ca0d81a57fd36cf5da9621c44171d0f333f3f3e1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ The universal selector is a special [type selector](/en-US/docs/Web/CSS/Referenc
- `*|*` - matches all elements
- `|*` - matches all elements without any declared namespace

> [!NOTE]
> The universal selector (`*`) matches **elements only**.
> It does **not** directly match pseudo-elements by itself.
>
> To match all {{cssxref("::before")}} pseudo-elements on a page, for example, you would have to use a selector like `*::before`. This works because the `*` matches all elements, and the `::before` pseudo-element is available on all elements.
## Syntax

```css
Expand Down