.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / function-url-quotes / README.md
1 # function-url-quotes
2
3 Require or disallow quotes for urls.
4
5 ```css
6 a { background: url("x.jpg") }
7 /**                 ↑     ↑
8  *             These quotes */
9 ```
10
11 This rule ignores `@import` in Less.
12
13 ## Options
14
15 `string`: `"always"|"never"`
16
17 ### `"always"`
18
19 Urls *must always* be quoted.
20
21 The following patterns are considered violations:
22
23 ```css
24 @import url(foo.css);
25 ```
26
27 ```css
28 @document domain(http://www.w3.org/);
29 ```
30
31 ```css
32 @font-face { font-family: 'foo'; src: url(foo.ttf); }
33 ```
34
35 ```css
36 @-moz-document url-prefix() {}
37 ```
38
39 The following patterns are *not* considered violations:
40
41 ```css
42 a { background: url('x.jpg'); }
43 ```
44
45 ```css
46 @import url("foo.css");
47 ```
48
49 ```css
50 @document domain('http://www.w3.org/');
51 ```
52
53 ```css
54 @font-face { font-family: "foo"; src: url("foo.ttf"); }
55 ```
56
57 ```css
58 @-moz-document url-prefix('') {}
59 ```
60
61 ### `"never"`
62
63 Urls *must never* be quoted.
64
65 The following patterns are considered violations:
66
67 ```css
68 a { background: url('x.jpg'); }
69 ```
70
71 ```css
72 @import url("foo.css");
73 ```
74
75 ```css
76 @font-face { font-family: "foo"; src: url('foo.ttf'); }
77 ```
78
79 The following patterns are *not* considered violations:
80
81 ```css
82 a { background: url(x.jpg); }
83 ```
84
85 ```css
86 @import url(foo.css);
87 ```
88
89 ```css
90 @font-face { font-family: 'foo'; src: url(foo.ttf); }
91 ```
92
93 ## Optional secondary options
94
95 ### `except: ["empty"]`
96
97 Reverse the primary option if the function has no arguments.
98
99 For example, with `"always"`.
100
101 The following pattern is *not* considered violations:
102
103 ```css
104 @-moz-document url-prefix() {}
105 ```