Skip to content

Bug: selector-complexity reports keyframe selectors as type selectors #582

Open

Description

@Pixel998

Environment

ESLint version: v10.11.0
@eslint/css version: v2.0.0
Node version: v24.16.0
npm version: v11.13.0
Operating System: windows

Which language are you using?

stylesheet

What did you do?

Configuration
import css from "@eslint/css";

export default [
	{
		files: ["**/*.css"],
		plugins: { css },
		language: "css/css",
		rules: {
			"css/selector-complexity": ["error", { maxTypes: 0 }],
		},
	},
];
/* eslint css/selector-complexity: ["error", { "maxTypes": 0 }] */

@keyframes fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

What did you expect to happen?

No errors. Keyframe selectors should not be counted by maxTypes.

What actually happened?

4:2  Exceeded maximum type selector. Only 0 allowed.
8:2  Exceeded maximum type selector. Only 0 allowed.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-yykapbcr

Participation

  • I am willing to submit a pull request for this issue.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

No response

Activity

  1. eslint-github-bot commented on Oct 4, 2026

    @eslint-github-bot

    👋 Hi! This issue is being addressed in pull request #586. Thanks, @ump45nose!

  2. added
    acceptedThere is consensus among the team that this change meets the criteria for inclusion
    on Oct 6, 2026
  3. DMartens commented on Oct 6, 2026

    @DMartens
    Contributor

    I agree that keyframe selectors should be excluded being counted as type selectors.
    The whole selector list should be ignored, so maxCompounds can also not trigger.

  4. eslint-github-bot commented on Oct 11, 2026

    @eslint-github-bot

    👋 Hi! This issue is being addressed in pull request #590. Thanks, @Pixel998!

  5. moved this from Ready to Implement to Implementing in Triageon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't working

Type

No type

Projects

  • Status
    Implementing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions