Skip to content

Conversation

@romainmenke
Copy link
Member

@romainmenke romainmenke commented Nov 26, 2025

Which issue, if any, is this issue related to?

Is there anything in the PR that needs further explanation?

JSDOM recently adopted @csstools/css-syntax-patches-for-csstree which made me less reluctant to integrate it directly here. It seems to work well there and nothing surprising or alarming surfaced.

The merging of various configs wasn't entirely correct before.
CSSTree supports appending definitions by leading with a pipe symbol |.
While our code always did overrides with the spread operator.

This matters when we are combining multiple sources (syntax patches from csstools, language options, rule config)

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

🦋 Changeset detected

Latest commit: b092024

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

This PR includes changesets to release 1 package
Name Type
stylelint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

This PR is packaged and the instant preview is available (b092024). View the demo website.

Install it locally:

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

romainmenke and others added 3 commits November 26, 2025 13:41
…grating-csstools-css-syntax-patches-for-csstree--adaptable-jaguar-e2fb11b478' of https://github.com/stylelint/stylelint into fix-no-unknown-false-positives-for-latest-specs-by-integrating-csstools-css-syntax-patches-for-csstree--adaptable-jaguar-e2fb11b478
@jeddy3 jeddy3 mentioned this pull request Nov 26, 2025
16 tasks
@jeddy3
Copy link
Member

jeddy3 commented Nov 26, 2025

This is fantastic, thank you!

It's great to see all the issues resolved in the demo.

/** @todo leverage import attributes once support for Node.js v18.19 is dropped */

I've added this to the Prepare 17.0.0 task list.

Comment on lines 38 to 39
if (typeof source1 === 'undefined' || typeof source2 === 'undefined')
return source1 ?? source2 ?? {};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've built in a lot of checks for undefined. (Maybe these should be extended to cover null?)

My thinking is that we want to be really forgiving in these objects and configs and allow authors to pass only those definitions they want to override.

If you see ways we can improve this code, feedback is welcome :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific instance was unreachable and could be removed, but the pattern repeats itself a few times in this file :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking is that we want to be really forgiving in these objects and configs and allow authors to pass only those definitions they want to override.

That sounds appropriate to me.

@romainmenke romainmenke marked this pull request as ready for review November 26, 2025 13:32
@romainmenke romainmenke requested a review from a team as a code owner November 26, 2025 13:32
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@jeddy3 jeddy3 mentioned this pull request Nov 26, 2025
4 tasks
@romainmenke
Copy link
Member Author

I'll wait a bit before merging in case other maintainers have feedback

…ecs-by-integrating-csstools-css-syntax-patches-for-csstree--adaptable-jaguar-e2fb11b478
@romainmenke romainmenke merged commit f152564 into main Nov 27, 2025
20 checks passed
@romainmenke romainmenke deleted the fix-no-unknown-false-positives-for-latest-specs-by-integrating-csstools-css-syntax-patches-for-csstree--adaptable-jaguar-e2fb11b478 branch November 27, 2025 17:46
},
"dependencies": {
"@csstools/css-parser-algorithms": "^3.0.5",
"@csstools/css-syntax-patches-for-csstree": "^1.0.19",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 29, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 30, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 1, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 2, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 4, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 4, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.26.0 | 16.26.1 |


## [v16.26.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16261---2025-11-28)

It fixes numerous false positive bugs, including many in the `declaration-property-value-no-unknown` rule for the latest CSS specifications.

- Fixed: `*-no-unknown` false positives for latest specs by integrating `@csstools/css-syntax-patches-for-csstree` ([#8850](stylelint/stylelint#8850)) ([@romainmenke](https://github.com/romainmenke)).
- Fixed: `at-rule-no-unknown` false positives for `@function` ([#8851](stylelint/stylelint#8851)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `declaration-property-value-no-unknown` false positives for `attr()`, `if()` and custom functions ([#8853](stylelint/stylelint#8853)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `function-url-quotes` false positives when URLs require quoting ([#8804](stylelint/stylelint#8804)) ([@taearls](https://github.com/taearls)).
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::scroll-button()` ([#8856](stylelint/stylelint#8856)) ([@Mouvedia](https://github.com/Mouvedia)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment