Skip to content

Latest commit

 

History

History
119 lines (82 loc) · 2.1 KB

File metadata and controls

119 lines (82 loc) · 2.1 KB

media-query-list-comma-space-after

Require a single space or disallow whitespace after the commas of media query lists.

@media screen and (color), projection and (color) {}
/**                      ↑
 *            These commas */

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

选项

string: "always"|"never"|"always-single-line"|"never-single-line"

"always"

There must always be a single space after the commas.

以下模式被视为违规:

@media screen and (color),projection and (color) {}
@media screen and (color)
,projection and (color) {}

以下模式被视为违规:

@media screen and (color), projection and (color) {}
@media screen and (color)
, projection and (color) {}

"never"

There must never be whitespace after the commas.

以下模式被视为违规:

@media screen and (color), projection and (color) {}
@media screen and (color)
, projection and (color) {}

以下模式被视为违规:

@media screen and (color),projection and (color) {}
@media screen and (color)
,projection and (color) {}

"always-single-line"

There must always be a single space after the commas in single-line media query lists.

以下模式被视为违规:

@media screen and (color),projection and (color) {}

以下模式被视为违规:

@media screen and (color), projection and (color) {}
@media screen and (color)
, projection and (color) {}
@media screen and (color)
,projection and (color) {}

"never-single-line"

There must never be whitespace after the commas in single-line media query lists.

以下模式被视为违规:

@media screen and (color), projection and (color) {}

以下模式被视为违规:

@media screen and (color),projection and (color) {}
@media screen and (color)
,projection and (color) {}
@media screen and (color)
, projection and (color) {}