.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / function-url-no-scheme-relative / README.md
1 # function-url-no-scheme-relative
2
3 Disallow scheme-relative urls.
4
5 ```css
6 a { background-image: url('//www.google.com/file.jpg'); }
7 /**                        ↑ 
8  *  This scheme-relative url */
9 ```
10
11 A [scheme-relative url](https://url.spec.whatwg.org/#syntax-url-scheme-relative) is a url that begins with `//` followed by a host.
12
13 This rule ignores url arguments that are variables (`$sass`, `@less`, `--custom-property`).
14
15 ## Options
16
17 ### `true`
18
19 The following patterns are considered violations:
20
21 ```css
22 a { 
23   background: url("//www.google.com/file.jpg"); 
24 }
25 ```
26
27 The following patterns are *not* considered violations:
28
29 ```css
30 a { 
31   background: url("../file.jpg"); 
32 }
33 ```
34
35 ```css
36 a { 
37   background: url("http://www.google.com/file.jpg"); 
38 }
39 ```
40
41 ```css
42 a { 
43   background: url("/path/to/file.jpg"); 
44 }
45 ```