custom-property-empty-line-before
What it does
Section titled “What it does”Reports a custom property declaration with no empty line before it. One that is first in its block, right after a comment or another custom property, or in a single-line block is not reported.
Why it matters
Section titled “Why it matters”Custom properties are the variables of a block, and a gap before the first of them sets them off from the ordinary declarations, so a reader finds the values a block defines.
Example
Section titled “Example”With this configuration:
dollar-variable-empty-line-before: warncustom-property-empty-line-before: warndouble-slash-comment-empty-line-before: warnno-empty-comment: { level: warn, options: { separators: true } }... $d: 4; color: red;... --f: 6; --g: 7;...
...Configuration
Section titled “Configuration”css: lint: rules: custom-property-empty-line-before: warn # off (default), warn, errorless: lint: rules: custom-property-empty-line-before: warn # off (default), warn, errorscss: lint: rules: custom-property-empty-line-before: warn # off (default), warn, errorEnabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line custom-property-empty-line-before in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | custom-property-empty-line-before |
full |