1
0
mirror of https://github.com/thangisme/notes.git synced 2024-09-26 00:45:54 -04:00
notes/node_modules/stylelint/lib/rules/function-url-no-scheme-relative
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

function-url-no-scheme-relative

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).

Options

true

The following patterns are considered warnings:

a { 
  background: url("//www.google.com/file.jpg"); 
}

The following patterns are not considered warnings:

a { 
  background: url("../file.jpg"); 
}
a { 
  background: url("http://www.google.com/file.jpg"); 
}
a { 
  background: url("/path/to/file.jpg"); 
}