notes/node_modules/stylelint/lib/rules/block-no-single-line/README.md

1.1 KiB

block-no-single-line

Deprecated: instead use the block-opening-brace-newline-after and block-closing-brace-newline-before rules with the option "always". See the FAQs for an example.

Disallow single-line blocks.

  a { color: pink; top: 0; }
/** ↑                      ↑
 * Declaration blocks like this */

Options

true

The following patterns are considered warnings:

a { color: pink; }
a,
b { color: pink; }
a { color: pink; top: 1px; }
@media print { a { color: pink; } }
@media print {
  a { color: pink; }
}
a {
  color: red;
  @media print { color: pink; }
}

The following patterns are not considered warnings:

a {
  color: pink;
}
a, b {
  color: pink;
}
@media print {
 a {
   color: pink;
 }
}
a {
  color: red;
  @media print {
    color: pink;
  }
}