Philipp Partosch 46a936d7de added all files to project | 2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago | |
index.js | 2 years ago |
Disallow scheme-relative urls.
a { background-image: url('//www.google.com/file.jpg'); }
/** ↑
* This scheme-relative url */
A scheme-relative url is a url that begins with //
followed by a host.
This rule ignores url arguments that are variables ($sass
, @less
, --custom-property
).
true
The following patterns are considered violations:
a {
background: url("//www.google.com/file.jpg");
}
The following patterns are not considered violations:
a {
background: url("../file.jpg");
}
a {
background: url("http://www.google.com/file.jpg");
}
a {
background: url("/path/to/file.jpg");
}