0

尝试通过 postcss 使用嵌套规则,但在下面收到警告。我需要在 stylelint 文件中添加哪些规则来修复这些警告?

这是CSS:

.count-sec {
    height: 520px;

    & p {
      color:#fff;
      margin: 0;
    }
}

警告:

Expected a trailing semicolon (declaration-block-trailing-semicolon) [stylelint]
Expected newline before "}" of a multi-line block (block-closing-brace-newline-before) [stylelint]
4

1 回答 1

1

预期尾随分号 (declaration-block-trailing-semicolon) [stylelint]

您应该将规则更改declaration-block-trailing-semicolon"always"https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon/

多行块的“}”之前的预期换行符(block-closure-brace-newline-before)[stylelint]

您应该将规则更改block-closing-brace-newline-before"always"https://stylelint.io/user-guide/rules/block-closing-brace-newline-before/

于 2017-07-11T19:04:09.667 回答