Skip to content

font-family-no-duplicate-names

Reports a family that appears twice in one font-family list, on the repeat.

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.

Reported
...
font-family: "Arial", serif;
font-family: Arial, inherit;
font-family: Arial, serif, "Arial";
...
font: 12px Arial, sans-serif;
}
...
css:
lint:
rules:
font-family-no-duplicate-names: warn # off (default), warn, error
less:
lint:
rules:
font-family-no-duplicate-names: warn # off (default), warn, error
scss:
lint:
rules:
font-family-no-duplicate-names: warn # off (default), warn, error

Enabled 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.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint font-family-no-duplicate-names full