Skip to content

Add property-layout-mappings rule#8687

Merged
jeddy3 merged 11 commits into
stylelint:mainfrom
sw1tch3roo:feature/property-layout-mappings
Apr 14, 2026
Merged

Add property-layout-mappings rule#8687
jeddy3 merged 11 commits into
stylelint:mainfrom
sw1tch3roo:feature/property-layout-mappings

Conversation

@sw1tch3roo
Copy link
Copy Markdown
Contributor

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

Closes #8429

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jul 25, 2025

🦋 Changeset detected

Latest commit: 5fb9139

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

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

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
Copy Markdown
Contributor

github-actions Bot commented Jul 25, 2025

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

Install it locally:

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

Comment thread lib/rules/property-layout-mappings/README.md Outdated
Copy link
Copy Markdown
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.

@sw1tch3roo Thank you for getting started on yet another rule!

I've suggested changes, including to the autofix and secondary option behaviours.

(We haven't got issues for them yet, but the plan is for this to be the first of a handful of rules that'll cover logical things for units, values and feature sizes. So it's great to see the ball rolling with this first rule.)

Comment thread docs/user-guide/rules.md Outdated
Comment thread lib/rules/property-layout-mappings/README.md Outdated
Comment thread lib/rules/property-layout-mappings/README.md Outdated
Comment thread lib/rules/property-layout-mappings/README.md Outdated
Comment thread lib/rules/property-layout-mappings/README.md Outdated
Comment thread lib/rules/property-layout-mappings/index.mjs Outdated
Comment thread lib/rules/property-layout-mappings/index.mjs Outdated
Comment thread lib/reference/properties.mjs Outdated
Comment thread lib/rules/property-layout-mappings/index.mjs Outdated
Comment thread lib/rules/property-layout-mappings/index.mjs Outdated
@sw1tch3roo
Copy link
Copy Markdown
Contributor Author

@jeddy3 hi! Could you check the changes when you have some free time?

@jeddy3
Copy link
Copy Markdown
Member

jeddy3 commented Sep 2, 2025

Could you check the changes when you have some free time?

@sw1tch3roo I hope to have time to review the changes in a couple of weeks, as I'm currently on a family holiday. I need to set aside a chunk of dedicated time to dive into new rules. Thanks for your patience.

@spike-rabbit
Copy link
Copy Markdown

@jeddy3 is there any chance you will have another look here?

The plugin we are using to enforce logical properties in our repository is no longer receiving updates and thus lacking stylelint@17 support.

Do you think it is likely to have this PR more or less merged soon or would you recommend that we fork our current plugin?

If I can do something useful, I am also happy to help you here. With testing or whatever might be needed.

@jeddy3
Copy link
Copy Markdown
Member

jeddy3 commented Mar 27, 2026

@spike-rabbit Good timing on the question, as I was planning to revisit some of these older PRs now that 17.0.0 is out. In the meantime, I believe the stylelint-plugin-logical-css plugin is compatible with 17.0.0. It supersedes some of the older, unmaintained logical plugins.

@sw1tch3roo Sorry for the delay in reviewing, we were focused on 17.0.0 and subsequent releases.

Do you still have time to continue this PR, or shall I pick it up? I'm happy to.

If you are, am I right in thinking that the remaining work is?:

  • rebasing and resolving conflicts
  • removing the used dir secondary option
  • having autofix respect the value of languageOptions.directionality, i.e. margin-left should map to margin-inline-end (not inline-start) for RTL

@jeddy3 jeddy3 force-pushed the feature/property-layout-mappings branch from 00d5471 to 127b71b Compare March 29, 2026 22:29
@jeddy3
Copy link
Copy Markdown
Member

jeddy3 commented Mar 29, 2026

I dug into this further to confirm what was left to do. Based on @romainmenke's #8687 (comment), I looked more deeply into postcss-logical's approach to directionality. I think I've understood the nuances, but not 100% sure.

I've pushed a couple of commits to add support for directionality. (Apologies for the force push - the branch was 300 commits behind.)

There are now two problem messages:

rejected: (type, property) => `Unexpected ${type} property "${property}"`,
expected: (actual, expected) => `Expected "${actual}" to be "${expected}"`,

The first is used for the:

  • "physical" primary option
    • e.g, Unexpected flow-relative property "margin-inline-start"
  • "flow-relative" primary option when the directionality inline and block axes aren't set
    • e.g, Unexpected physical property "margin-left"

In this mode, the rule simply flags any property that doesn't match the primary option.

If the directionality inline and block axes are set, we have enough information to safely include the expected flow-relative property in the problem message and to autofix, e.g. Expected "margin-left" to be "margin-inline-start".

As there's a risk of people misconfiguring the directionality property, I've added validation for it.

Lastly, I reverted to ignoreProperties instead of except for simplicity.

I believe we're closer to landing this now, but it'd be great if anyone has time to sanity check the approach.

@jeddy3 jeddy3 mentioned this pull request Apr 1, 2026
4 tasks
@jeddy3 jeddy3 changed the title Add property-layout-mappings Add property-layout-mappings rule Apr 1, 2026
Comment thread docs/user-guide/configure.md
Copy link
Copy Markdown
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM 👍🏼

@romainmenke
Copy link
Copy Markdown
Member

Thank you for working on this PR @jeddy3 🙇

I noticed that the directionality config isn't fully covered yet.
For example when setting block direction to ltr or rtl.

It seems that only left vs. right and top vs. bottom are covered, but not swapping the axis themselves.

See these demo's:

Both demo's yield the same result, which shouldn't be the case.

I am afraid that this implies a much more detailed and complicated lookup and replacement pattern.

@jeddy3
Copy link
Copy Markdown
Member

jeddy3 commented Apr 8, 2026

@romainmenke Thank you for highlighting this. Sorry, it was a big oversight on my part.

I've revisited it and based the implementation more closely on postcss-logical's.

I think, at least hope 😅 , I've understood it now.

I'm reading the directionality config as:

block: 'top-to-bottom',
↑       ↑      ↑
axis    start  end

And additionally, basing the conversion on:

const inlineIsHorizontal =
  directionality.inline === 'left-to-right' || directionality.inline === 'right-to-left';

I've added a consistent set of test cases to each of the testRules that use directionality: sides, axis and radius.

Demo's:

@jeddy3
Copy link
Copy Markdown
Member

jeddy3 commented Apr 12, 2026

(Pushed a commit to align the problem message with the latest conventions.)

Copy link
Copy Markdown
Member

@romainmenke romainmenke left a comment

Choose a reason for hiding this comment

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

This looks great 👍

I tried a lot of combinations and each worked a expected!
Thank you for the refactor 🙇

One suggestion, but not blocking

Comment thread lib/rules/property-layout-mappings/index.mjs
@jeddy3 jeddy3 force-pushed the feature/property-layout-mappings branch from d7bf215 to 79532a4 Compare April 14, 2026 11:18
@jeddy3 jeddy3 merged commit 16a6090 into stylelint:main Apr 14, 2026
15 of 16 checks passed
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 15, 2026
| datasource | package   | from   | to     |
| ---------- | --------- | ------ | ------ |
| npm        | stylelint | 17.4.0 | 17.8.0 |


## [v17.8.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1780---2026-04-15)

It adds 3 new rules and 1 configuration property.

- Added: `languageOptions.directionality` configuration property ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `property-layout-mappings` rule ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `relative-selector-nesting-notation` rule ([#8730](stylelint/stylelint#8730)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `selector-no-deprecated` rule ([#8694](stylelint/stylelint#8694)) ([@immitsu](https://github.com/immitsu)).


## [v17.7.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1770---2026-04-12)

It fixes 4 bugs, including clearer problem messages by removing filler words and leading with the problem. We've also released `1.0.0` of [create-stylelint](https://github.com/stylelint/create-stylelint) to help with first-time Stylelint setup.

- Fixed: clarity of problem messages ([#9199](stylelint/stylelint#9199)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `--print-config` CLI flag to hide internal properties ([#9194](stylelint/stylelint#9194)) ([@ybiquitous](https://github.com/ybiquitous)).
- Fixed: `function-url-quotes` false positives when URLs have modifiers ([#8702](stylelint/stylelint#8702)) ([@immitsu](https://github.com/immitsu)).
- Fixed: `selector-no-qualifying-type` false positives for `:has()` ([#9182](stylelint/stylelint#9182)) ([@romainmenke](https://github.com/romainmenke)).


## [v17.6.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1760---2026-03-26)

It adds support for extending units in `languageOptions`, which then apply to rules like `declaration-property-value-no-unknown`, and fixes 2 bugs.

- Added: support for extending units to `languageOptions` ([#9166](stylelint/stylelint#9166)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: missing `ruleMetadata` when linting multiple files with overrides ([#9154](stylelint/stylelint#9154)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `custom-property-no-missing-var-function` false positives for `timeline-scope` and `animation-timeline` ([#9164](stylelint/stylelint#9164)) ([@splincode](https://github.com/splincode)).


## [v17.5.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1750---2026-03-19)

It deprecates two rule options, adds 1 rule option and fixes 7 bugs. We've also released [`2.1.0`](https://github.com/stylelint/vscode-stylelint/releases/tag/2.1.0) of [our VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), which adds 8 new requested features, and our [first release](https://www.npmjs.com/package/@stylelint/language-server) of the Stylelint Language Server.

- Deprecated: `*syntax` options from `declaration-property-value-no-unknown` ([#9102](stylelint/stylelint#9102)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Added: `ignoreMediaFeatureNameValues: {}` to `media-feature-name-value-no-unknown` ([#8976](stylelint/stylelint#8976)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `node_modules` not ignored when using `codeFilename` in Node.js API ([#9130](stylelint/stylelint#9130)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Fixed: `Error TS7016` for imported `css-tree` types ([#9133](stylelint/stylelint#9133)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-keyword-no-deprecated` false positives for function arguments ([#9116](stylelint/stylelint#9116)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-no-unknown` false positives for `calc-size()` containing `size` keyword ([#9105](stylelint/stylelint#9105)) ([@hriztam](https://github.com/hriztam)).
- Fixed: `no-descending-specificity` & `no-duplicate-selectors` false negatives for equivalent compound selectors ([#8977](stylelint/stylelint#8977)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `no-invalid-position-declaration` false positives for `@mixin` and `@scope` ([#9120](stylelint/stylelint#9120)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `property-no-unknown` false negatives for `types` ([#9117](stylelint/stylelint#9117)) ([@Mouvedia](https://github.com/Mouvedia)).
robbevp pushed a commit to robbevp/website-robbevanpetegem that referenced this pull request Apr 18, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | patch | [`9.39.3` -> `9.39.4`](https://renovatebot.com/diffs/npm/eslint/9.39.3/9.39.4) |
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`3.8.1` -> `3.8.3`](https://renovatebot.com/diffs/npm/prettier/3.8.1/3.8.3) |
| [stylelint](https://stylelint.io) ([source](https://github.com/stylelint/stylelint)) | devDependencies | minor | [`17.4.0` -> `17.8.0`](https://renovatebot.com/diffs/npm/stylelint/17.4.0/17.8.0) |

---

### Release Notes

<details>
<summary>eslint/eslint (eslint)</summary>

### [`v9.39.4`](https://github.com/eslint/eslint/releases/tag/v9.39.4)

[Compare Source](eslint/eslint@v9.39.3...v9.39.4)

#### Bug Fixes

- [`f18f6c8`](eslint/eslint@f18f6c8) fix: update dependency minimatch to ^3.1.5 ([#&#8203;20564](eslint/eslint#20564)) (Milos Djermanovic)
- [`a3c868f`](eslint/eslint@a3c868f) fix: update dependency [@&#8203;eslint/eslintrc](https://github.com/eslint/eslintrc) to ^3.3.4 ([#&#8203;20554](eslint/eslint#20554)) (Milos Djermanovic)
- [`234d005`](eslint/eslint@234d005) fix: minimatch security vulnerability patch for v9.x ([#&#8203;20549](eslint/eslint#20549)) (Andrej Beles)
- [`b1b37ee`](eslint/eslint@b1b37ee) fix: update `ajv` to `6.14.0` to address security vulnerabilities ([#&#8203;20538](eslint/eslint#20538)) (루밀LuMir)

#### Documentation

- [`4675152`](eslint/eslint@4675152) docs: add deprecation notice partial ([#&#8203;20520](eslint/eslint#20520)) (Milos Djermanovic)

#### Chores

- [`b8b4eb1`](eslint/eslint@b8b4eb1) chore: update dependencies for ESLint v9.39.4 ([#&#8203;20596](eslint/eslint#20596)) (Francesco Trotta)
- [`71b2f6b`](eslint/eslint@71b2f6b) chore: package.json update for [@&#8203;eslint/js](https://github.com/eslint/js) release (Jenkins)
- [`1d16c2f`](eslint/eslint@1d16c2f) ci: pin Node.js 25.6.1 ([#&#8203;20563](eslint/eslint#20563)) (Milos Djermanovic)

</details>

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.8.3`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#383)

[Compare Source](prettier/prettier@3.8.2...3.8.3)

[diff](prettier/prettier@3.8.2...3.8.3)

##### SCSS: Prevent trailing comma in `if()` function ([#&#8203;18471](prettier/prettier#18471) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```scss
// Input
$value: if(sass(false): 1; else: -1);

// Prettier 3.8.2
$value: if(
  sass(false): 1; else: -1,
);

// Prettier 3.8.3
$value: if(sass(false): 1; else: -1);
```

### [`v3.8.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#382)

[Compare Source](prettier/prettier@3.8.1...3.8.2)

[diff](prettier/prettier@3.8.1...3.8.2)

##### Angular: Support Angular v21.2 ([#&#8203;18722](prettier/prettier#18722), [#&#8203;19034](prettier/prettier#19034) by [@&#8203;fisker](https://github.com/fisker))

Exhaustive typechecking with `@default never;`

<!-- prettier-ignore -->

```html
<!-- Input -->
@&#8203;switch (foo) {
  @&#8203;case (1) {}
  @&#8203;default never;
}

<!-- Prettier 3.8.1 -->
SyntaxError: Incomplete block "default never". If you meant to write the @&#8203; character, you should use the "&#&#8203;64;" HTML entity instead. (3:3)

<!-- Prettier 3.8.2 -->
@&#8203;switch (foo) {
  @&#8203;case (1) {}
  @&#8203;default never;
}
```

`arrow function` and `instanceof` expressions.

<!-- prettier-ignore -->

```html
<!-- Input -->
@&#8203;let fn = (a) =>        a?    1:2;

{{ fn ( a         instanceof b)}}

<!-- Prettier 3.8.1 -->
@&#8203;let fn = (a) =>        a?    1:2;

{{ fn ( a         instanceof b)}}

<!-- Prettier 3.8.2 -->
@&#8203;let fn = (a) => (a ? 1 : 2);

{{ fn(a instanceof b) }}
```

</details>

<details>
<summary>stylelint/stylelint (stylelint)</summary>

### [`v17.8.0`](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1780---2026-04-15)

[Compare Source](stylelint/stylelint@17.7.0...17.8.0)

It adds 3 new rules and 1 configuration property.

- Added: `languageOptions.directionality` configuration property ([#&#8203;8687](stylelint/stylelint#8687)) ([@&#8203;sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `property-layout-mappings` rule ([#&#8203;8687](stylelint/stylelint#8687)) ([@&#8203;sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `relative-selector-nesting-notation` rule ([#&#8203;8730](stylelint/stylelint#8730)) ([@&#8203;sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `selector-no-deprecated` rule ([#&#8203;8694](stylelint/stylelint#8694)) ([@&#8203;immitsu](https://github.com/immitsu)).

### [`v17.7.0`](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1770---2026-04-12)

[Compare Source](stylelint/stylelint@17.6.0...17.7.0)

It fixes 4 bugs, including clearer problem messages by removing filler words and leading with the problem. We've also released `1.0.0` of [create-stylelint](https://github.com/stylelint/create-stylelint) to help with first-time Stylelint setup.

- Fixed: clarity of problem messages ([#&#8203;9199](stylelint/stylelint#9199)) ([@&#8203;jeddy3](https://github.com/jeddy3)).
- Fixed: `--print-config` CLI flag to hide internal properties ([#&#8203;9194](stylelint/stylelint#9194)) ([@&#8203;ybiquitous](https://github.com/ybiquitous)).
- Fixed: `function-url-quotes` false positives when URLs have modifiers ([#&#8203;8702](stylelint/stylelint#8702)) ([@&#8203;immitsu](https://github.com/immitsu)).
- Fixed: `selector-no-qualifying-type` false positives for `:has()` ([#&#8203;9182](stylelint/stylelint#9182)) ([@&#8203;romainmenke](https://github.com/romainmenke)).

### [`v17.6.0`](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1760---2026-03-26)

[Compare Source](stylelint/stylelint@17.5.0...17.6.0)

It adds support for extending units in `languageOptions`, which then apply to rules like `declaration-property-value-no-unknown`, and fixes 2 bugs.

- Added: support for extending units to `languageOptions` ([#&#8203;9166](stylelint/stylelint#9166)) ([@&#8203;jeddy3](https://github.com/jeddy3)).
- Fixed: missing `ruleMetadata` when linting multiple files with overrides ([#&#8203;9154](stylelint/stylelint#9154)) ([@&#8203;kovsu](https://github.com/kovsu)).
- Fixed: `custom-property-no-missing-var-function` false positives for `timeline-scope` and `animation-timeline` ([#&#8203;9164](stylelint/stylelint#9164)) ([@&#8203;splincode](https://github.com/splincode)).

### [`v17.5.0`](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1750---2026-03-19)

[Compare Source](stylelint/stylelint@17.4.0...17.5.0)

It deprecates two rule options, adds 1 rule option and fixes 7 bugs. We've also released [`2.1.0`](https://github.com/stylelint/vscode-stylelint/releases/tag/2.1.0) of [our VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), which adds 8 new requested features, and our [first release](https://www.npmjs.com/package/@&#8203;stylelint/language-server) of the Stylelint Language Server.

- Deprecated: `*syntax` options from `declaration-property-value-no-unknown` ([#&#8203;9102](stylelint/stylelint#9102)) ([@&#8203;ragini-pandey](https://github.com/ragini-pandey)).
- Added: `ignoreMediaFeatureNameValues: {}` to `media-feature-name-value-no-unknown` ([#&#8203;8976](stylelint/stylelint#8976)) ([@&#8203;kovsu](https://github.com/kovsu)).
- Fixed: `node_modules` not ignored when using `codeFilename` in Node.js API ([#&#8203;9130](stylelint/stylelint#9130)) ([@&#8203;adalinesimonian](https://github.com/adalinesimonian)).
- Fixed: `Error TS7016` for imported `css-tree` types ([#&#8203;9133](stylelint/stylelint#9133)) ([@&#8203;ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-keyword-no-deprecated` false positives for function arguments ([#&#8203;9116](stylelint/stylelint#9116)) ([@&#8203;ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-no-unknown` false positives for `calc-size()` containing `size` keyword ([#&#8203;9105](stylelint/stylelint#9105)) ([@&#8203;hriztam](https://github.com/hriztam)).
- Fixed: `no-descending-specificity` & `no-duplicate-selectors` false negatives for equivalent compound selectors ([#&#8203;8977](stylelint/stylelint#8977)) ([@&#8203;kovsu](https://github.com/kovsu)).
- Fixed: `no-invalid-position-declaration` false positives for `@mixin` and `@scope` ([#&#8203;9120](stylelint/stylelint#9120)) ([@&#8203;ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `property-no-unknown` false negatives for `types` ([#&#8203;9117](stylelint/stylelint#9117)) ([@&#8203;Mouvedia](https://github.com/Mouvedia)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS42MS4wIiwidXBkYXRlZEluVmVyIjoiNDEuNjEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.robbevp.be/robbevp/website-robbevanpetegem/pulls/508
Co-authored-by: Renovate Bot <renovate@robbevp.be>
Co-committed-by: Renovate Bot <renovate@robbevp.be>
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 19, 2026
| datasource | package   | from   | to     |
| ---------- | --------- | ------ | ------ |
| npm        | stylelint | 17.4.0 | 17.8.0 |


## [v17.8.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1780---2026-04-15)

It adds 3 new rules and 1 configuration property.

- Added: `languageOptions.directionality` configuration property ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `property-layout-mappings` rule ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `relative-selector-nesting-notation` rule ([#8730](stylelint/stylelint#8730)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `selector-no-deprecated` rule ([#8694](stylelint/stylelint#8694)) ([@immitsu](https://github.com/immitsu)).


## [v17.7.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1770---2026-04-12)

It fixes 4 bugs, including clearer problem messages by removing filler words and leading with the problem. We've also released `1.0.0` of [create-stylelint](https://github.com/stylelint/create-stylelint) to help with first-time Stylelint setup.

- Fixed: clarity of problem messages ([#9199](stylelint/stylelint#9199)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `--print-config` CLI flag to hide internal properties ([#9194](stylelint/stylelint#9194)) ([@ybiquitous](https://github.com/ybiquitous)).
- Fixed: `function-url-quotes` false positives when URLs have modifiers ([#8702](stylelint/stylelint#8702)) ([@immitsu](https://github.com/immitsu)).
- Fixed: `selector-no-qualifying-type` false positives for `:has()` ([#9182](stylelint/stylelint#9182)) ([@romainmenke](https://github.com/romainmenke)).


## [v17.6.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1760---2026-03-26)

It adds support for extending units in `languageOptions`, which then apply to rules like `declaration-property-value-no-unknown`, and fixes 2 bugs.

- Added: support for extending units to `languageOptions` ([#9166](stylelint/stylelint#9166)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: missing `ruleMetadata` when linting multiple files with overrides ([#9154](stylelint/stylelint#9154)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `custom-property-no-missing-var-function` false positives for `timeline-scope` and `animation-timeline` ([#9164](stylelint/stylelint#9164)) ([@splincode](https://github.com/splincode)).


## [v17.5.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1750---2026-03-19)

It deprecates two rule options, adds 1 rule option and fixes 7 bugs. We've also released [`2.1.0`](https://github.com/stylelint/vscode-stylelint/releases/tag/2.1.0) of [our VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), which adds 8 new requested features, and our [first release](https://www.npmjs.com/package/@stylelint/language-server) of the Stylelint Language Server.

- Deprecated: `*syntax` options from `declaration-property-value-no-unknown` ([#9102](stylelint/stylelint#9102)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Added: `ignoreMediaFeatureNameValues: {}` to `media-feature-name-value-no-unknown` ([#8976](stylelint/stylelint#8976)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `node_modules` not ignored when using `codeFilename` in Node.js API ([#9130](stylelint/stylelint#9130)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Fixed: `Error TS7016` for imported `css-tree` types ([#9133](stylelint/stylelint#9133)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-keyword-no-deprecated` false positives for function arguments ([#9116](stylelint/stylelint#9116)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-no-unknown` false positives for `calc-size()` containing `size` keyword ([#9105](stylelint/stylelint#9105)) ([@hriztam](https://github.com/hriztam)).
- Fixed: `no-descending-specificity` & `no-duplicate-selectors` false negatives for equivalent compound selectors ([#8977](stylelint/stylelint#8977)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `no-invalid-position-declaration` false positives for `@mixin` and `@scope` ([#9120](stylelint/stylelint#9120)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `property-no-unknown` false negatives for `types` ([#9117](stylelint/stylelint#9117)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 30, 2026
| datasource | package   | from   | to     |
| ---------- | --------- | ------ | ------ |
| npm        | stylelint | 17.4.0 | 17.9.1 |


## [v17.9.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1791---2026-04-27)

It fixes 4 bugs. We also documented the `messageArgs` each rule provides to the `message` configuration property.

- Fixed: `ConfigurationError` regression for custom syntaxes ([#9245](stylelint/stylelint#9245)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: MD5 hash algorithm to SHA256 for caching ([#9241](stylelint/stylelint#9241)) ([@rkdfx](https://github.com/rkdfx)).
- Fixed: `property-no-deprecated` autofix for `page-break-*: always` ([#9214](stylelint/stylelint#9214)) ([@rkdfx](https://github.com/rkdfx)).
- Fixed: `selector-no-deprecated` false positives for `::part()` ([#9227](stylelint/stylelint#9227)) ([@SaekiTominaga](https://github.com/SaekiTominaga)).


## [v17.9.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1790---2026-04-23)

It adds 3 new features. Adding the `referenceFiles` property to your configuration object makes the `no-unknown-animations`, `no-unknown-custom-media` and `no-unknown-custom-properties` rules more useful.

- Added: experimental `referenceFiles` to configuration object ([#9179](stylelint/stylelint#9179)) ([@jeddy3](https://github.com/jeddy3)).
- Added: experimental `abortSignal` option to Node.js API for cancellation support ([#9213](stylelint/stylelint#9213)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Added: `maxWarnings` to configuration object ([#9181](stylelint/stylelint#9181)) ([@mrginglymus](https://github.com/mrginglymus)).


## [v17.8.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1780---2026-04-15)

It adds 3 new rules and 1 configuration property.

- Added: `languageOptions.directionality` configuration property ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `property-layout-mappings` rule ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `relative-selector-nesting-notation` rule ([#8730](stylelint/stylelint#8730)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `selector-no-deprecated` rule ([#8694](stylelint/stylelint#8694)) ([@immitsu](https://github.com/immitsu)).


## [v17.7.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1770---2026-04-12)

It fixes 4 bugs, including clearer problem messages by removing filler words and leading with the problem. We've also released `1.0.0` of [create-stylelint](https://github.com/stylelint/create-stylelint) to help with first-time Stylelint setup.

- Fixed: clarity of problem messages ([#9199](stylelint/stylelint#9199)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `--print-config` CLI flag to hide internal properties ([#9194](stylelint/stylelint#9194)) ([@ybiquitous](https://github.com/ybiquitous)).
- Fixed: `function-url-quotes` false positives when URLs have modifiers ([#8702](stylelint/stylelint#8702)) ([@immitsu](https://github.com/immitsu)).
- Fixed: `selector-no-qualifying-type` false positives for `:has()` ([#9182](stylelint/stylelint#9182)) ([@romainmenke](https://github.com/romainmenke)).


## [v17.6.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1760---2026-03-26)

It adds support for extending units in `languageOptions`, which then apply to rules like `declaration-property-value-no-unknown`, and fixes 2 bugs.

- Added: support for extending units to `languageOptions` ([#9166](stylelint/stylelint#9166)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: missing `ruleMetadata` when linting multiple files with overrides ([#9154](stylelint/stylelint#9154)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `custom-property-no-missing-var-function` false positives for `timeline-scope` and `animation-timeline` ([#9164](stylelint/stylelint#9164)) ([@splincode](https://github.com/splincode)).


## [v17.5.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1750---2026-03-19)

It deprecates two rule options, adds 1 rule option and fixes 7 bugs. We've also released [`2.1.0`](https://github.com/stylelint/vscode-stylelint/releases/tag/2.1.0) of [our VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), which adds 8 new requested features, and our [first release](https://www.npmjs.com/package/@stylelint/language-server) of the Stylelint Language Server.

- Deprecated: `*syntax` options from `declaration-property-value-no-unknown` ([#9102](stylelint/stylelint#9102)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Added: `ignoreMediaFeatureNameValues: {}` to `media-feature-name-value-no-unknown` ([#8976](stylelint/stylelint#8976)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `node_modules` not ignored when using `codeFilename` in Node.js API ([#9130](stylelint/stylelint#9130)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Fixed: `Error TS7016` for imported `css-tree` types ([#9133](stylelint/stylelint#9133)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-keyword-no-deprecated` false positives for function arguments ([#9116](stylelint/stylelint#9116)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-no-unknown` false positives for `calc-size()` containing `size` keyword ([#9105](stylelint/stylelint#9105)) ([@hriztam](https://github.com/hriztam)).
- Fixed: `no-descending-specificity` & `no-duplicate-selectors` false negatives for equivalent compound selectors ([#8977](stylelint/stylelint#8977)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `no-invalid-position-declaration` false positives for `@mixin` and `@scope` ([#9120](stylelint/stylelint#9120)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `property-no-unknown` false negatives for `types` ([#9117](stylelint/stylelint#9117)) ([@Mouvedia](https://github.com/Mouvedia)).
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 2, 2026
| datasource | package   | from   | to     |
| ---------- | --------- | ------ | ------ |
| npm        | stylelint | 17.4.0 | 17.9.1 |


## [v17.9.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1791---2026-04-27)

It fixes 4 bugs. We also documented the `messageArgs` each rule provides to the `message` configuration property.

- Fixed: `ConfigurationError` regression for custom syntaxes ([#9245](stylelint/stylelint#9245)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: MD5 hash algorithm to SHA256 for caching ([#9241](stylelint/stylelint#9241)) ([@rkdfx](https://github.com/rkdfx)).
- Fixed: `property-no-deprecated` autofix for `page-break-*: always` ([#9214](stylelint/stylelint#9214)) ([@rkdfx](https://github.com/rkdfx)).
- Fixed: `selector-no-deprecated` false positives for `::part()` ([#9227](stylelint/stylelint#9227)) ([@SaekiTominaga](https://github.com/SaekiTominaga)).


## [v17.9.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1790---2026-04-23)

It adds 3 new features. Adding the `referenceFiles` property to your configuration object makes the `no-unknown-animations`, `no-unknown-custom-media` and `no-unknown-custom-properties` rules more useful.

- Added: experimental `referenceFiles` to configuration object ([#9179](stylelint/stylelint#9179)) ([@jeddy3](https://github.com/jeddy3)).
- Added: experimental `abortSignal` option to Node.js API for cancellation support ([#9213](stylelint/stylelint#9213)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Added: `maxWarnings` to configuration object ([#9181](stylelint/stylelint#9181)) ([@mrginglymus](https://github.com/mrginglymus)).


## [v17.8.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1780---2026-04-15)

It adds 3 new rules and 1 configuration property.

- Added: `languageOptions.directionality` configuration property ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `property-layout-mappings` rule ([#8687](stylelint/stylelint#8687)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `relative-selector-nesting-notation` rule ([#8730](stylelint/stylelint#8730)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
- Added: `selector-no-deprecated` rule ([#8694](stylelint/stylelint#8694)) ([@immitsu](https://github.com/immitsu)).


## [v17.7.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1770---2026-04-12)

It fixes 4 bugs, including clearer problem messages by removing filler words and leading with the problem. We've also released `1.0.0` of [create-stylelint](https://github.com/stylelint/create-stylelint) to help with first-time Stylelint setup.

- Fixed: clarity of problem messages ([#9199](stylelint/stylelint#9199)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: `--print-config` CLI flag to hide internal properties ([#9194](stylelint/stylelint#9194)) ([@ybiquitous](https://github.com/ybiquitous)).
- Fixed: `function-url-quotes` false positives when URLs have modifiers ([#8702](stylelint/stylelint#8702)) ([@immitsu](https://github.com/immitsu)).
- Fixed: `selector-no-qualifying-type` false positives for `:has()` ([#9182](stylelint/stylelint#9182)) ([@romainmenke](https://github.com/romainmenke)).


## [v17.6.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1760---2026-03-26)

It adds support for extending units in `languageOptions`, which then apply to rules like `declaration-property-value-no-unknown`, and fixes 2 bugs.

- Added: support for extending units to `languageOptions` ([#9166](stylelint/stylelint#9166)) ([@jeddy3](https://github.com/jeddy3)).
- Fixed: missing `ruleMetadata` when linting multiple files with overrides ([#9154](stylelint/stylelint#9154)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `custom-property-no-missing-var-function` false positives for `timeline-scope` and `animation-timeline` ([#9164](stylelint/stylelint#9164)) ([@splincode](https://github.com/splincode)).


## [v17.5.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#1750---2026-03-19)

It deprecates two rule options, adds 1 rule option and fixes 7 bugs. We've also released [`2.1.0`](https://github.com/stylelint/vscode-stylelint/releases/tag/2.1.0) of [our VS Code extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint), which adds 8 new requested features, and our [first release](https://www.npmjs.com/package/@stylelint/language-server) of the Stylelint Language Server.

- Deprecated: `*syntax` options from `declaration-property-value-no-unknown` ([#9102](stylelint/stylelint#9102)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Added: `ignoreMediaFeatureNameValues: {}` to `media-feature-name-value-no-unknown` ([#8976](stylelint/stylelint#8976)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `node_modules` not ignored when using `codeFilename` in Node.js API ([#9130](stylelint/stylelint#9130)) ([@adalinesimonian](https://github.com/adalinesimonian)).
- Fixed: `Error TS7016` for imported `css-tree` types ([#9133](stylelint/stylelint#9133)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-keyword-no-deprecated` false positives for function arguments ([#9116](stylelint/stylelint#9116)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `declaration-property-value-no-unknown` false positives for `calc-size()` containing `size` keyword ([#9105](stylelint/stylelint#9105)) ([@hriztam](https://github.com/hriztam)).
- Fixed: `no-descending-specificity` & `no-duplicate-selectors` false negatives for equivalent compound selectors ([#8977](stylelint/stylelint#8977)) ([@kovsu](https://github.com/kovsu)).
- Fixed: `no-invalid-position-declaration` false positives for `@mixin` and `@scope` ([#9120](stylelint/stylelint#9120)) ([@ragini-pandey](https://github.com/ragini-pandey)).
- Fixed: `property-no-unknown` false negatives for `types` ([#9117](stylelint/stylelint#9117)) ([@Mouvedia](https://github.com/Mouvedia)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add property-layout-mappings

6 participants