Skip to content

Bug: font-family-fallbacks reports an error for font-family: inherit #387

@julienw

Description

@julienw

Environment

ESLint version: v10.0.2
@eslint/css version: 0.14.1
Node version: v24.13
npm version: v11.9
Operating System: Debian stable

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/font-family-fallbacks": "error",
        },
    },
];
body {
    font-family: inherit;
    color: red;
}

What did you expect to happen?

No error, inherit shouldn't trigger the rule

What actually happened?

Error:

  2:18  error  Use fallback fonts and a generic font last  css/font-family-fallbacks

Link to Minimal Reproducible Example

https://github.com/julienw/eslint-csss-font-family-issue

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

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