1 # font-family-no-duplicate-names
3 Disallow duplicate font family names.
6 a { font-family: serif, serif; }
8 * These font family names */
11 This rule checks the `font` and `font-family` properties.
13 This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntaxes.
15 **Caveat:** This rule will stumble on *unquoted* multi-word font names and *unquoted* font names containing escape sequences. Wrap these font names in quotation marks, and everything should be fine.
21 The following patterns are considered violations:
24 a { font-family: 'Times', Times, serif; }
28 a { font: 1em "Arial", 'Arial', sans-serif; }
32 a { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif, sans-serif; }
35 The following patterns are *not* considered violations:
38 a { font-family: Times, serif; }
42 a { font: 1em "Arial", "sans-serif", sans-serif; }
46 a { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif; }
49 ## Optional secondary options
51 ### `ignoreFontFamilyNames: ["/regex/", "string"]`
56 ["/^My Font /", "monospace"]
59 The following patterns are *not* considered violations:
62 font-family: monospace, monospace
66 font-family: "My Font Family", "My Font Family", monospace