Require a single space or disallow whitespace before the semicolons of declaration blocks.
a { color: pink; }
/** ↑
* The space before this semicolon */
This rule ignores semicolons that are preceded by Less mixins.
命令行中的 --fix
选项可以自动修复此规则报告的所有问题。
string
: "always"|"never"|"always-single-line"|"never-single-line"
There must always be a single space before the semicolons.
以下模式被视为违规:
a { color: pink; }
a { color: pink; top: 0; }
以下模式不被视为违规:
a { color: pink ; }
a { color: pink ; top: 0 ; }
There must never be whitespace before the semicolons.
以下模式被视为违规:
a { color: pink ; }
a { color: pink ; top: 0 ; }
以下模式不被视为违规:
a { color: pink; }
a { color: pink; top: 0; }
There must always be a single space before the semicolons in single-line declaration blocks.
以下模式被视为违规:
a { color: pink; }
以下模式不被视为违规:
a { color: pink ; }
a { color: pink; top: 0; }
a { color: pink ; top: 0 ; }
There must never be whitespace before the semicolons in single-line declaration blocks.
以下模式被视为违规:
a { color: pink ; }
以下模式不被视为违规:
a { color: pink; }
a { color: pink; top: 0; }
a { color: pink ; top: 0 ; }