at-rule-name-newline-after
Require a newline after at-rule names.
@media
/*↑*/ (max-width: 600px) {}
/** ↑
* The newline after this at-rule name */The fix option can automatically fix most of the problems reported by this rule. Under Less it writes no break behind an @import or @plugin with no whitespace behind the name, since Less takes the two as directives only with whitespace there. The warning stands.
The rule passes over @charset, whose spelling Stylelint's at-charset-rule-no-invalid rule judges; a CSS file holding one gets a warning asking for that rule where the configuration leaves it off.
Options
string: "always"|"always-multi-line"
"always"
There must always be a newline after at-rule names.
The following patterns are considered problems:
@import "x.css";@media (min-width: 700px) and
(orientation: landscape) {}The following patterns are not considered problems:
@import
"x.css";@import
"x.css" screen and
(orientation:landscape);@media
(min-width: 700px) and (orientation: landscape) {}@media
(min-width: 700px) and
(orientation: landscape) {}"always-multi-line"
There must always be a newline after at-rule names in at-rules with multi-line parameters.
The following patterns are considered problems:
@import "x.css" screen and
(orientation:landscape);@media (min-width: 700px) and
(orientation: landscape) {}The following patterns are not considered problems:
@import "x.css";@import
"x.css";@import "x.css" screen and (orientation:landscape);@media (min-width: 700px) and (orientation: landscape) {}@media
(min-width: 700px) and
(orientation: landscape) {}