noDuplicateFontNames
Este conteúdo não está disponível em sua língua ainda.
Diagnostic Category: lint/suspicious/noDuplicateFontNames
Since: v1.8.0
Sources:
Disallow duplicate names within font families.
This rule checks the font
and font-family
properties for duplicate font names.
This rule ignores var(—custom-property) variable syntaxes now.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.css:1:56 lint/suspicious/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Duplicate font names are redundant and unnecessary: sans-serif
> 1 │ a { font-family: “Lucida Grande”, ‘Arial’, sans-serif, sans-serif; }
│ ^^^^^^^^^^
2 │
ℹ Remove duplicate font names within the property
code-block.css:1:44 lint/suspicious/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Duplicate font names are redundant and unnecessary: Arial
> 1 │ a { font-family: ‘Arial’, “Lucida Grande”, Arial, sans-serif; }
│ ^^^^^
2 │
ℹ Remove duplicate font names within the property
code-block.css:1:39 lint/suspicious/noDuplicateFontNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ Duplicate font names are redundant and unnecessary: Arial
> 1 │ a { FONT: italic 300 16px/30px Arial, ” Arial”, serif; }
│ ^^^^^^^^
2 │
ℹ Remove duplicate font names within the property