UNPKG

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