.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / font-family-no-duplicate-names / README.md
1 # font-family-no-duplicate-names
2
3 Disallow duplicate font family names.
4
5 ```css
6 a { font-family: serif, serif; }
7 /**              ↑      ↑
8  * These font family names */
9 ```
10
11 This rule checks the `font` and `font-family` properties.
12
13 This rule ignores `$sass`, `@less`, and `var(--custom-property)` variable syntaxes.
14
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.
16
17 ## Options
18
19 ### `true`
20
21 The following patterns are considered violations:
22
23 ```css
24 a { font-family: 'Times', Times, serif; }
25 ```
26
27 ```css
28 a { font: 1em "Arial", 'Arial', sans-serif; }
29 ```
30
31 ```css
32 a { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif, sans-serif; }
33 ```
34
35 The following patterns are *not* considered violations:
36
37 ```css
38 a { font-family: Times, serif; }
39 ```
40
41 ```css
42 a { font: 1em "Arial", "sans-serif", sans-serif; }
43 ```
44
45 ```css
46 a { font: normal 14px/32px -apple-system, BlinkMacSystemFont, sans-serif; }
47 ```
48
49 ## Optional secondary options
50
51 ### `ignoreFontFamilyNames: ["/regex/", "string"]`
52
53 Given:
54
55 ```js
56 ["/^My Font /", "monospace"]
57 ```
58
59 The following patterns are *not* considered violations:
60
61 ```css
62 font-family: monospace, monospace
63 ```
64
65 ```css
66 font-family: "My Font Family", "My Font Family", monospace
67 ```
68