Repository: stylelint/stylelint
Pull request #8472: Add `ignorePreludeOfAtRules: []` to `length-zero-no-unit`
Author: login: ryo-manba
Created: 2025-03-15T07:06:05Z | Merged: 2025-03-20T10:24:47Z

<!-- Each pull request must be associated with an open issue unless it's a documentation fix. If a corresponding issue does not exist, please create one so we can discuss the change first. -->

<!-- Please answer the following. We close pull requests that don't. -->

> Which issue, if any, is this issue related to?

Closes #8405 

> Is there anything in the PR that needs further explanation?

No, it's self-explanatory.


Linked issue #8405: Add `ignoreAtRulePreludes: []` to `length-zero-no-unit`
### What minimal example or steps are needed to reproduce the bug?

Use this code:

```scss
@mixin hardcode-total-height(
  $base-height,
  $extra-height: 0px
) {
  height: calc($base-height + $extra-height);
}

a {
  @include hardcode-total-height(10px);
}

@function add-numbers(
  $number-a,
  $number-b: 0px
) {
  @return calc($number-a + $number-b)
}

div {
  width: add-numbers(10px);
}
```

Run stylelint on it with option `--fix`.

Recompile Sass.

### What minimal configuration is needed to reproduce the bug?

```json
{
  "extends": [
    "stylelint-config-standard-scss"
  ]
}
```

### How did you run Stylelint?

```shell
stylelint "src/**/*.{css,scss,sass,vue}" --fix
```

https://stylelint.io/demo/#N4Igxg9gJgpiBcIACBbAlgDzQOwAQAsBDAJyklgFoAXCKwgGwvxjQHN8qAKAHW26oAkAI0IBnGExbsqAGl78BMDFWKFJbDvFwAGAA4ZeASlzB5VZhqpawDMJ2FiJF6bgDUuRctXrphgNy8AL7y2IQmZkg4YPQArrAEJGTQEjR0jM4cnACMehj+QSFIAGYx2GBUaBB4hFBQFNgxKEIwxKI8fIINTS0UhHIdAl3NxBRCWrlmxqYd-EjEMFQxxHg29HaDjcO9bh5DPUKGZsF8HVBoAG7hM1QA7mhQ5lo1dXut2bn5HYEgMiBFaPQYAA5QgoOCIJSg3SAgB0ojAolEP3AVX+rAQIGmuFw3BASioMGwUFEuK0AG1eNjsbjRFQAJ6A+g4KgUSDYNEUWmEImJTkIkkgSm4AC6QWRbLRADEIMQUIQqBiAFaiKrI2C6JGILE4kC0hkwJnYKiknX0eUwWm4-rU3X0xnMvmIk24gB6ADYYTlPVahTS7QaHRK2Jy6DzSI6BVpXVkACww7Tx3FiwJAA

### Which Stylelint-related dependencies are you using?

```json
      "sass": "^1.85.0",
      "stylelint": "^16.14.1",
      "stylelint-config-standard-scss": "^14.0.0",
      "stylelint-config-standard-vue": "^1.0.0",
      "stylelint-order": "^6.0.4",
      "stylelint-scss": "^6.10.1",
      "vite": "^6.1.0",
```

### What did you expect to happen?

1. autofix does NOT remove the unit from the default argument values
2. therefore there is no Sass compilation error about invalid units

### What actually happened?

1. Autofix transforms 0px into 0
2. On recompilation, Sass says `10px and 0 are incompatible`.

### Do you have a proposal to fix the bug?

Apply the same fix as in https://github.com/stylelint/stylelint/issues/8034 to mixin/function default argument values
Linked issue comments: user: login: jeddy3
created_at: 2025-02-26T15:12:20Z
body: @ArianeBouchardConformit Thanks for the clear report, the demo and for using the template.

We should have the rule ignore lengths in these at-rules.

> Apply the same fix as in https://github.com/stylelint/stylelint/issues/8034 to mixin/function default argument values

We can either add a heuristic to [`isStandardSyntaxFunction`](https://github.com/stylelint/stylelint/blob/main/lib/utils/isStandardSyntaxFunction.mjs) that detects this `$var: value` pattern for arguments as I don't think that's standard syntax. However, this may be tricky.

Alternatively, we can add an `ignoreAtRulePreludes: []` secondary option, which you can use to ignore the preludes of `@mixin` and `@function`. It'd work in the same way as the current [`ignoreFunctions[]`](https://stylelint.io/user-guide/rules/length-zero-no-unit/#ignorefunctions-regex-regex-string) secondary option. You can use this option now, but it'll be a bit long-winded:

```
{
  "extends": [
    "stylelint-config-standard-scss"
  ],
  "rules": {
    "length-zero-no-unit": [true, {
      "ignoreFunctions": ["hardcode-total-height"]
    }]
  }
}
```

[Demo](https://stylelint.io/demo/#N4Igxg9gJgpiBcIACBbAlgDzQOwAQAsBDAJyklgFoAXCKwgGwvxjQHN8qAKAHW26oAkAI0IBnGExbsqAGl78BMDFWKFJbDvFwAGAA4ZeASlzB5VZhqpawDMJ2FiJF6bgDUuRctXrphgNy8AL7y2IQmZkg4YPQArrAEJGTQEjR0jM4cnACMehj+QSFIAGYx2GBUaBB4hFBQFNgxKEIwxKI8fIINTS0UhHIdAl3NxBRCWrlmxqYd-EjEMFQxxHg29HaDjcO9bh5DPUKGZsF8HVBoAG7hM1QA7mhQ5lo1dXut2bn5HYEgMiBFaPQYAA5QgoOCIJSg3SAgB0ojAolEP3AVX+rAQIGmuFw3BASioMGwUFEuK0AG1eNjsbjRFQAJ6A+g4KgUSDYNEUWmEImJTkIkkgSm4AC6-WpIGIMUBAq0WKpuMB2FY5goAC8WhB6prSmgqKTcGSVDEYDIrlT5SA2NgIPMAGKlcqVbAyg24oikcgpWgMHwcXHCoXYwIBvC4Y7fX5stG2m0oQhUDEAK1EVWRsF0SMQcpp9MZzP1CvjMFpuLFOJAtIZMCZ2BZ8MRBZAAD0AGwwnLt0tCnNVmssqNsTl0HmkPkNhDlptZAAsMO0c9xQRAgSAA).

I suggest we go with the `ignoreAtRulePreludes: []` secondary option.

I've labelled the issue as ready to implement. Please consider [contributing](https://stylelint.io/contributing) if you have time. 

There are [steps on how to add a new option](https://stylelint.io/developer-guide/rules#add-an-option-to-a-rule) in the Developer guide.
author_association: MEMBER
user: login: ArianeBouchardConformit
created_at: 2025-02-26T19:17:45Z
body: @jeddy3  What do you mean by "I don't think that's standard syntax"? Mixin default arguments look pretty well defined in the Sass documentation to me.

https://sass-lang.com/documentation/at-rules/mixin/#optional-arguments

Unless you meant not standard in terms of CSS syntax?

As for the suggestion of adding an option, I'm not sure I understand why the behaviour should be optional. If it's a default, basic behaviour that dollar variable declarations should not have `length-zero-no-unit` applied to them because it will break any Sass calculations, why wouldn't the same apply to mixin arguments?
author_association: NONE
user: login: jeddy3
created_at: 2025-02-27T10:58:16Z
body: > Unless you meant not standard in terms of CSS syntax?

Yes, exactly that. Sorry, I could've been clearer. Stylelint and its built-in rules [are designed for CSS](https://stylelint.io/about/vision). We've added [points of extension](https://stylelint.io/about/vision#extensible) that communities, like the SCSS one, can use to extend Stylelint for their needs.

We often add options to rules to help these communities repurpose the built-in rules, e.g. used [here](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/d0feabca7e43ddcb033f0636ccdeb4ca9b0671ad/index.js#L11) and [here](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/at-rule-no-unknown/index.js#L8-L31) in the SCSS community's shared configs.

The proposed `ignoreAtRulePreludes: []` option would do the same.

---

`@function` [may be coming to CSS](https://drafts.csswg.org/css-mixins-1/), and it may have [parameterised arguments with default values](https://drafts.csswg.org/css-mixins-1/#function-parameter). If it lands in browsers, we'll add built-in support to Stylelint for its particular flavour of mixin. 
author_association: MEMBER
user: login: Mouvedia
created_at: 2025-02-27T20:13:50Z
body: > …You can use _`ignoreFunctions`_ now, but it'll be a bit long-winded:
> 
> ```
> {
>   "extends": [
>     "stylelint-config-standard-scss"
>   ],
>   "rules": {
>     "length-zero-no-unit": [true, {
>       "ignoreFunctions": ["hardcode-total-height"]
>     }]
>   }
> }
> ```

Wouldn't `ignoreAtRulePreludes` suffer from the same affliction? (unless it's `boolean` instead of `string[]`)
i.e. `"ignoreAtRulePreludes": ["hardcode-total-height"]` vs `"ignoreAtRulePreludes": true`


author_association: MEMBER
user: login: jeddy3
created_at: 2025-02-28T10:48:23Z
body: The option would ignore lengths in the preludes of the specified at-rules, e.g.:

```json
{
  "rules": {
    "length-zero-no-unit": [true, {
      "ignoreAtRulePreludes": ["function", "mixin"]
    }]
  }
}
author_association: MEMBER

Diff:
diff --git a/.changeset/brown-hounds-teach.md b/.changeset/brown-hounds-teach.md
new file mode 100644
index 0000000000..9e0ba54eb9
--- /dev/null
+++ b/.changeset/brown-hounds-teach.md
@@ -0,0 +1,5 @@
+---
+"stylelint": minor
+---
+
+Added: `ignorePreludeOfAtRules: []` to `length-zero-no-unit`
diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md
index 978123da5b..ef75d34651 100644
--- a/lib/rules/length-zero-no-unit/README.md
+++ b/lib/rules/length-zero-no-unit/README.md
@@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignorePreludeOfAtRules: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the preludes of the specified at-rules.
+
+Given:
+
+```json
+["media", "/^--bar/"]
+```
+
+The following patterns are _not_ considered problems:
+
+<!-- prettier-ignore -->
+```css
+@media (height > 0px) {}
+```
+
+<!-- prettier-ignore -->
+```css
+@--bar-baz 0px;
+```
diff --git a/lib/rules/length-zero-no-unit/__tests__/index.mjs b/lib/rules/length-zero-no-unit/__tests__/index.mjs
index 6451221b5a..cad0048893 100644
--- a/lib/rules/length-zero-no-unit/__tests__/index.mjs
+++ b/lib/rules/length-zero-no-unit/__tests__/index.mjs
@@ -990,3 +990,41 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	config: [true, { ignorePreludeOfAtRules: ['media'] }],
+	accept: [
+		{
+			code: '@media (height > 0px) {}',
+		},
+		{
+			code: '@media (min-width: 0px) {}',
+		},
+	],
+});
+
+testRule({
+	ruleName,
+	customSyntax: 'postcss-scss',
+	config: [true, { ignorePreludeOfAtRules: [/^mix/] }],
+	accept: [
+		{
+			code: '@mixin foo($x: 0px) { width: $x; }',
+		},
+		{
+			code: '@mixing bar($x: 0px) { height: $x; }',
+		},
+	],
+	reject: [
+		{
+			code: '@function foo($x: 0px) { @return $x; }',
+			fixed: '@function foo($x: 0) { @return $x; }',
+			message: messages.rejected,
+			line: 1,
+			column: 20,
+			endLine: 1,
+			endColumn: 22,
+		},
+	],
+});
diff --git a/lib/rules/length-zero-no-unit/index.cjs b/lib/rules/length-zero-no-unit/index.cjs
index d995e1fe2b..0169afcc03 100644
--- a/lib/rules/length-zero-no-unit/index.cjs
+++ b/lib/rules/length-zero-no-unit/index.cjs
@@ -48,6 +48,7 @@ const rule = (primary, secondaryOptions) => {
 				possible: {
 					ignore: ['custom-properties'],
 					ignoreFunctions: [validateTypes.isString, validateTypes.isRegExp],
+					ignorePreludeOfAtRules: [validateTypes.isString, validateTypes.isRegExp],
 				},
 				optional: true,
 			},
@@ -120,6 +121,8 @@ const rule = (primary, secondaryOptions) => {
 		function checkAtRule(node) {
 			if (!isStandardSyntaxAtRule(node)) return;
 
+			if (optionsMatches(secondaryOptions, 'ignorePreludeOfAtRules', node.name)) return;
+
 			const index = nodeFieldIndices.atRuleParamIndex(node);
 			const parsedValue = valueParser(getAtRuleParams(node));
 
diff --git a/lib/rules/length-zero-no-unit/index.mjs b/lib/rules/length-zero-no-unit/index.mjs
index 4f975467b2..3359c036f0 100644
--- a/lib/rules/length-zero-no-unit/index.mjs
+++ b/lib/rules/length-zero-no-unit/index.mjs
@@ -45,6 +45,7 @@ const rule = (primary, secondaryOptions) => {
 				possible: {
 					ignore: ['custom-properties'],
 					ignoreFunctions: [isString, isRegExp],
+					ignorePreludeOfAtRules: [isString, isRegExp],
 				},
 				optional: true,
 			},
@@ -117,6 +118,8 @@ const rule = (primary, secondaryOptions) => {
 		function checkAtRule(node) {
 			if (!isStandardSyntaxAtRule(node)) return;
 
+			if (optionsMatches(secondaryOptions, 'ignorePreludeOfAtRules', node.name)) return;
+
 			const index = atRuleParamIndex(node);
 			const parsedValue = valueParser(getAtRuleParams(node));
 
diff --git a/types/stylelint/index.d.ts b/types/stylelint/index.d.ts
index cf95a8784a..ed2acdfd6a 100644
--- a/types/stylelint/index.d.ts
+++ b/types/stylelint/index.d.ts
@@ -600,6 +600,7 @@ declare namespace stylelint {
 			{
 				ignore: OneOrMany<'custom-properties'>;
 				ignoreFunctions: OneOrMany<StringOrRegex>;
+				ignorePreludeOfAtRules: OneOrMany<StringOrRegex>;
 			}
 		>;
 		'lightness-notation': CoreRule<'percentage' | 'number', {}, AutofixMessage>;


Reviews:
user: login: Mouvedia
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-16T01:46:34Z
user: login: jeddy3
body: @ryo-manba Thank you for working on this. Looking good.

I've added a couple of suggestions.
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-16T07:53:58Z
user: login: ybiquitous
body: Overall LGTM, but I've left a few minor suggestions. Can you take a look?
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-17T13:49:27Z
user: login: jeddy3
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-17T14:10:52Z
user: login: ryo-manba
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-20T08:10:26Z
user: login: jeddy3
body: Thanks for making the changes. LGTM.
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-20T10:24:23Z

Review comments:
diff_hunk: @@ -990,3 +990,30 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	config: [true, { ignoreAtRulePreludes: ['function', /^mix/] }],
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: Mouvedia
body: question

@jeddy3 was `ignore: ['at-rule-preludes']` considered?
I am asking because the name chosen could potentially make the user mistakenly pass the name of the prelude instead of an at-rule.
I know that it would be less specific but it would also be less error prone.
created_at: 2025-03-16T01:46:34Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignoreAtRulePreludes: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the specified at-rule preludes.
path: lib/rules/length-zero-no-unit/README.md
user: login: jeddy3
body: ```suggestion
### `ignorePreludeOfAtRules: ["/regex/", /regex/, "string"]`

Ignore units for zero lengths within the preludes of the specified at-rules.
```

This is the first time we're adding an option that targets a _specific thing_ of the [_user-defined thing_](https://stylelint.io/developer-guide/rules#user-defined-ignore). As we typically end with the user-defined thing, e.g. `ignoreAtRules`, we can use a `<thing>Of` naming convention.

(Sorry for not considering in the issue and causing you to change it in the PR.)
created_at: 2025-03-16T07:45:06Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignoreAtRulePreludes: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the specified at-rule preludes.
+
+Given:
+
+```json
+["function", "/^mix/"]
path: lib/rules/length-zero-no-unit/README.md
user: login: jeddy3
body: ```suggestion
["--foo", "/^--bar/"]
```

For "only use standard CSS syntax in examples and options" [convention](https://stylelint.io/developer-guide/rules#write-the-readme).
created_at: 2025-03-16T07:47:10Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignoreAtRulePreludes: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the specified at-rule preludes.
+
+Given:
+
+```json
+["function", "/^mix/"]
+```
+
+The following patterns are _not_ considered problems:
+
+<!-- prettier-ignore -->
+```css
+@mixin foo($x: 0px) { width: $x; }
path: lib/rules/length-zero-no-unit/README.md
user: login: jeddy3
body: ```suggestion
@--foo 0px {}
```
created_at: 2025-03-16T07:49:01Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignoreAtRulePreludes: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the specified at-rule preludes.
+
+Given:
+
+```json
+["function", "/^mix/"]
+```
+
+The following patterns are _not_ considered problems:
+
+<!-- prettier-ignore -->
+```css
+@mixin foo($x: 0px) { width: $x; }
+```
+
+<!-- prettier-ignore -->
+```css
+@function baz($x: 0px) { @return $x; }
path: lib/rules/length-zero-no-unit/README.md
user: login: jeddy3
body: ```suggestion
@--bar-baz 0px;
```
created_at: 2025-03-16T07:49:33Z
author_association: MEMBER
diff_hunk: @@ -990,3 +990,30 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	config: [true, { ignoreAtRulePreludes: ['function', /^mix/] }],
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: jeddy3
body: Good point. I've suggested another name [elsewhere in the review](https://github.com/stylelint/stylelint/pull/8472#discussion_r1997512086).
created_at: 2025-03-16T07:50:57Z
author_association: MEMBER
diff_hunk: @@ -990,3 +990,30 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: jeddy3
body: ```suggestion
	ruleName,
	customSyntax: 'postcss-scss',
```

Although not needed, we typically signal non-standard tests with a custom syntax config.
created_at: 2025-03-16T07:52:57Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignorePreludeOfAtRules: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the preludes of the specified at-rules.
+
+Given:
+
+```json
+["--foo", "/^--bar/"]
+```
+
+The following patterns are _not_ considered problems:
+
+<!-- prettier-ignore -->
+```css
+@--foo 0px {}
+```
+
+<!-- prettier-ignore -->
+```css
+@--bar-baz 0px;
+```
path: lib/rules/length-zero-no-unit/README.md
user: login: ybiquitous
body: [suggestion] Would you be willing to add a more practical example? E.g.

```json
"ignorePreludeOfAtRules": ["media"]
```

```css
@media (height > 0px) {}
```

created_at: 2025-03-17T13:46:23Z
author_association: MEMBER
diff_hunk: @@ -990,3 +990,31 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	customSyntax: 'postcss-scss',
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: ybiquitous
body: [suggestion] If possible, we'd like to prefer standard syntaxes over non-standard ones in the codebase. How about testing with standard syntaxes like `@media (height > 0px) {}` instead of the SCSS syntax?
created_at: 2025-03-17T13:48:44Z
author_association: MEMBER
diff_hunk: @@ -87,3 +87,25 @@ a { top: var(--foo, 0px); }
 ```css
 a { top: --bar(0px); }
 ```
+
+### `ignorePreludeOfAtRules: ["/regex/", /regex/, "string"]`
+
+Ignore units for zero lengths within the preludes of the specified at-rules.
+
+Given:
+
+```json
+["--foo", "/^--bar/"]
+```
+
+The following patterns are _not_ considered problems:
+
+<!-- prettier-ignore -->
+```css
+@--foo 0px {}
+```
+
+<!-- prettier-ignore -->
+```css
+@--bar-baz 0px;
+```
path: lib/rules/length-zero-no-unit/README.md
user: login: jeddy3
body: Let's replace `--foo` with `media` and keep the `^--bar` custom at-rule example to show both use cases.
created_at: 2025-03-17T14:05:17Z
author_association: MEMBER
diff_hunk: @@ -990,3 +990,31 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	customSyntax: 'postcss-scss',
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: jeddy3
body: Shall we:

- add another test case for `media` without custom syntax
- change the current test case to only use `/^mix/`

We do prefer standard syntaxes, but we also typically include non-standard test cases when the [original request](https://github.com/stylelint/stylelint/issues/8405) is in aid of supporting non-standard syntax so that we're confident we've addressed the issue.

This approach will let us do both.
created_at: 2025-03-17T14:10:47Z
author_association: MEMBER
diff_hunk: @@ -990,3 +990,31 @@ testRule({
 		},
 	],
 });
+
+testRule({
+	ruleName,
+	customSyntax: 'postcss-scss',
path: lib/rules/length-zero-no-unit/__tests__/index.mjs
user: login: ryo-manba
body: @jeddy3 @ybiquitous
Thanks for the review! I've fixed it.
[Add media query test case and example](https://github.com/stylelint/stylelint/pull/8472/commits/72bb54dc17c5363d48047a1ef80332b1222d8fd1)
created_at: 2025-03-20T08:10:26Z
author_association: MEMBER

PR comments:
user: login: changeset-bot[bot]
created_at: 2025-03-15T07:06:08Z
body: ###  🦋  Changeset detected

Latest commit: 72bb54dc17c5363d48047a1ef80332b1222d8fd1

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 1 package</summary>

  | Name      | Type  |
| --------- | ----- |
| stylelint | Minor |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/stylelint/stylelint/new/issue-8405?filename=.changeset/weak-fishes-type.md&value=---%0A%22stylelint%22%3A%20patch%0A---%0A%0AAdd%20%60ignorePreludeOfAtRules%3A%20%5B%5D%60%20to%20%60length-zero-no-unit%60%0A)


author_association: NONE
user: login: github-actions[bot]
created_at: 2025-03-15T07:07:46Z
body: <!-- posted by pkg.pr.new-custom-comment.mjs -->

## Try the Instant Preview in Online Demo

[Stylelint Online Demo](https://stylelint.io/demo/#N4IgJgpgDgziBcJgB0B2ACdyQwC4E8AbCQgS1V23ixAAtddZ4B6ZqAawHMA6KAJ26oIAd2Z4iJcrgACADgAsAdgBM2ADRpM2ccTIUAtAGMA9qgBmpTvrwBDVGBt8wVGoRu4IebGgC+IH0A)

## Install the Instant Preview to Your Local

```
npm i -D https://pkg.pr.new/stylelint@8472
```

---

[View Commit](https://github.com/stylelint/stylelint/commit/72bb54dc17c5363d48047a1ef80332b1222d8fd1)
author_association: CONTRIBUTOR
user: login: ryo-manba
created_at: 2025-03-16T13:00:35Z
body: @jeddy3 @Mouvedia 
Thanks for the suggestion. Fixed!
[Rename ignoreAtRulePreludes to ignorePreludeOfAtRules](https://github.com/stylelint/stylelint/pull/8472/commits/6b8f6be0204804ce1e4c653e1bf6c8e7ad753964)
author_association: MEMBER