Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent naming for pseudo-classes that act as functions #242

Open
connorshea opened this issue Jun 5, 2018 · 0 comments
Open

Inconsistent naming for pseudo-classes that act as functions #242

connorshea opened this issue Jun 5, 2018 · 0 comments
Labels
idle Issues and pull requests with no activity for three months.

Comments

@connorshea
Copy link
Contributor

connorshea commented Jun 5, 2018

I'm not sure if there's a better name for "pseudo-classes that act as functions"?

Essentially what I mean are pseudo-classes like :dir(), :lang(), etc.

This is a list of function selectors with weird/incorrect names in selectors.json:

  • :any: This is weird because it only has syntax specifically for the -webkit-/-moz- vendor prefixed versions. Also, it should be a function like :any().
  • :dir: Should be :dir().
  • :lang: Should be :lang().
  • :not: Should be :not().
  • :nth-child: Should be :nth-child().
  • :nth-last-child: Should be :nth-last-child().
  • :nth-last-of-type: Should be :nth-last-of-type().
  • :nth-of-type: Should be :nth-of-type().

Oddly, :host() and :host-context() are fine in this regard.

The logic that any selectors with () should have () included in their name is that there are selectors like :host as well as :host(), so you can't just take off the () or those two would conflict.

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests

1 participant