Skip to main content

import-notation

@import 规则指定字符串或 URL 表示法。

¥Specify string or URL notation for @import rules.

@import url("x.jpg");
/** ↑

* This notation */

fix 选项 可以自动修复此规则报告的所有问题。

¥The fix option can automatically fix all of the problems reported by this rule.

选项

¥Options

string"string"|"url"

"string"

@import 规则必须始终使用字符串表示法。

¥@import rules must always use string notation.

以下模式被视为问题:

¥The following patterns are considered problems:

@import url(foo.css);
@import url('foo.css');
@import url("foo.css");

以下模式不被视为问题:

¥The following patterns are not considered problems:

@import 'foo.css';
@import "foo.css";

"url"

@import 规则必须始终使用 URL 表示法。

¥@import rules must always use URL notation.

以下模式被视为问题:

¥The following patterns are considered problems:

@import 'foo.css';
@import "foo.css";

以下模式不被视为问题:

¥The following patterns are not considered problems:

@import url(foo.css);
@import url('foo.css');
@import url("foo.css");