Re: [csswg-drafts] [css-selectors] What should the specificity of functional :invalid() and :user-invalid() (#13679)

> I think this is closer to `:nth-child(even)`, `:dir(rtl)` or `:lang(en)` where the arguments to the functional selector aren't elements and it makes sense to me to be consistent to those.

I think it’s more close to `::view-transition-group()`, where `::view-transition-group(name)` is more specific than `::view-transition-group(*)` as the former targets the one specific group whereas the latter targets _any_ group.

Similarly I think that `:user-invalid(argument)` is more specific than `:user-invalid` (which could be seen as `:user-invalid(*)` BTW).

Additionally: `:nth-child(even)`, :lang(en)`, `:dir(rtl)`, `:first-child` always need an argument or no argument at all. So you can’t compare an argument-less version to a version that does have an argument _(e.g. you can’t compare `:nth-child` against `:nth-child(3n)` because the former does not exist)_

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


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

Received on Wednesday, 18 March 2026 19:47:49 UTC