Skip to content

Latest commit

 

History

History
103 lines (70 loc) · 1.36 KB

README.md

File metadata and controls

103 lines (70 loc) · 1.36 KB

function-url-quotes

Require or disallow quotes for urls.

a { background: url("x.jpg") }
/**                 ↑     ↑
 *             These quotes */

选项

string: "always"|"never"

"always"

Urls must always be quoted.

以下模式被视为违规:

@import url(foo.css);
@document domain(http://www.w3.org/);
@font-face { font-family: 'foo'; src: url(foo.ttf); }
@-moz-document url-prefix() {}

以下模式被视为违规:

a { background: url('x.jpg'); }
@import url("foo.css");
@document domain('http://www.w3.org/');
@font-face { font-family: "foo"; src: url("foo.ttf"); }
@-moz-document url-prefix('') {}

"never"

Urls must never be quoted.

以下模式被视为违规:

a { background: url('x.jpg'); }
@import url("foo.css");
@font-face { font-family: "foo"; src: url('foo.ttf'); }

以下模式被视为违规:

a { background: url(x.jpg); }
@import url(foo.css);
@font-face { font-family: 'foo'; src: url(foo.ttf); }

可选的辅助选项

except: ["empty"]

Reverse the primary option if the function has no arguments.

例如,使用 "always"

以下模式被视为违规:

@-moz-document url-prefix() {}