1 # custom-property-empty-line-before
3 Require or disallow an empty line before custom properties.
15 The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule. We recommend to enable [`indentation`](../indentation/README.md) rule for better autofixing results with this rule.
19 `string`: `"always"|"never"`
23 The following patterns are considered violations:
33 The following patterns are *not* considered violations:
47 The following patterns are considered violations:
67 The following patterns are *not* considered violations:
84 ## Optional secondary options
86 ### `except: ["after-comment", "after-custom-property", "first-nested"]`
88 #### `"after-comment"`
90 Reverse the primary option for custom properties that come after a comment.
92 Shared-line comments do not trigger this option.
94 For example, with `"always"`:
96 The following patterns are considered violations:
111 --foo: pink; /* comment */
116 The following patterns are *not* considered violations:
130 --foo: pink; /* comment */
136 #### `"after-custom-property"`
138 Reverse the primary option for custom properties that come after another custom property.
140 Shared-line comments do not affect this option.
142 For example, with `"always"`:
144 The following patterns are considered violations:
158 --foo: pink; /* comment */
164 The following patterns are *not* considered violations:
177 --foo: pink; /* comment */
182 #### `"first-nested"`
184 Reverse the primary option for custom properties that are nested and the first child of their parent node.
186 For example, with `"always"`:
188 The following patterns are considered violations:
199 The following patterns are *not* considered violations:
209 ### `ignore: ["after-comment", "inside-single-line-block"]`
211 #### `"after-comment"`
213 Ignore custom properties that are preceded by comments.
215 For example, with `"always"`:
217 The following patterns are *not* considered violations:
226 #### `"inside-single-line-block"`
228 Ignore custom properties that are inside single-line blocks.
230 For example, with `"always"`:
232 The following patterns are *not* considered violations:
235 a { --foo: pink; --bar: red; }