Re: [csswg-drafts] [css-nesting-1] [selectors-4] Figure out the specificity of nesting with pseudos and non-pseudos (#13108)

> However, it's not currently defined what the specificity of a pseudo-element is.

https://drafts.csswg.org/selectors-4/#specificity says this:

> A selector’s specificity is calculated for a given element as follows:
> 
> - count the number of ID selectors in the selector (= A)
> - count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= B)
> - **count the number of type selectors and pseudo-elements in the selector (= C)**
> - ignore the universal selector

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13108#issuecomment-3532301925 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 14 November 2025 11:29:43 UTC