function-url-no-scheme-relative
Disallow scheme-relative urls.
a { background-image: url('//www.example.org/file.jpg'); }/** ↑ * This scheme-relative url */Use this rule to enforce a convention, as a scheme-relative URL takes its scheme from the page and so fails when the page is opened from disk.
This rule ignores url arguments that are variables ($sass, @less, --custom-property).
This rule doesn’t have any message arguments.
Options
Section titled “Options”{ "function-url-no-scheme-relative": true}The following patterns are considered problems:
a { background: url("//www.example.org/file.jpg");}@import url("//www.example.org/foo.css");The following patterns are not considered problems:
a { background: url("../file.jpg");}a { background: url("http://www.example.org/file.jpg");}a { background: url("/path/to/file.jpg");}@import url("http://www.example.org/foo.css");@import url("/path/to/foo.css");