Philipp Partosch 46a936d7de added all files to project | 2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago | |
index.js | 2 years ago |
Require or disallow an empty line before the closing brace of blocks.
a {
color: pink;
/* ← */
} /* ↑ */
/** ↑
* This line */
The fix
option can automatically fix all of the problems reported by this rule.
string
: "always-multi-line"|"never"
always-multi-line
The following patterns are considered violations:
a {
color: pink;
}
The following patterns are not considered violations:
a {
color: pink;
}
a { color: pink; }
never
The following patterns are considered violations:
a {
color: pink;
}
The following patterns are not considered violations:
a {
color: pink;
}
a { color: pink; }
except: ["after-closing-brace"]
When a rule is nested, after-closing-brace
brace will reverse the primary option.
For example, with "never"
and except: ["after-closing-brace"]
:
The following patterns are considered violations:
@media print {
a {
color: aquamarine;
}
}
@supports (animation-name: test) {
a {
color: aquamarine;
}
}
@keyframes test {
100% {
color: aquamarine;
}
}
The following patterns are not considered violations:
@media print {
a {
color: aquamarine;
}
}
@font-face {
font-family: "MyFont";
src: url("myfont.woff2") format("woff2");
}
@supports (animation-name: test) {
a {
color: aquamarine;
}
}
@keyframes test {
100% {
color: aquamarine;
}
}
For example, with "always-multi-line"
and except: ["after-closing-brace"]
:
The following patterns are considered violations:
@media print {
a {
color: aquamarine;
}
}
@supports (animation-name: test) {
a {
color: aquamarine;
}
}
@keyframes test {
100% {
color: aquamarine;
}
}
The following patterns are not considered violations:
@media print {
a {
color: aquamarine;
}
}
@font-face {
font-family: "MyFont";
src: url("myfont.woff2") format("woff2");
}
@supports (animation-name: test) {
a {
color: aquamarine;
}
}
@keyframes test {
100% {
color: aquamarine;
}
}