font-family-no-duplicate-names
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesssuspiciousno fixdefault: offcss/stylelint-recommended
What it does
Section titled “What it does”Reports a family that appears twice in one font-family list, on the repeat.
Why it matters
Section titled “Why it matters”The second entry is never reached: the browser has already tried that font. It is a copy and paste mistake that hides the fallback order.
To fix, delete the repeat.
Example
Section titled “Example”... font-family: "Arial", serif; font-family: Arial, inherit; font-family: Arial, serif, "Arial";... font: 12px Arial, sans-serif;}...Configuration
Section titled “Configuration”css: lint: rules: font-family-no-duplicate-names: warn # off (default), warn, errorless: lint: rules: font-family-no-duplicate-names: warn # off (default), warn, errorscss: lint: rules: font-family-no-duplicate-names: warn # off (default), warn, errorEnabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line font-family-no-duplicate-names in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | font-family-no-duplicate-names |
full |