Skip to content

Commit 6260d46

Browse files
authored
Merge branch 'main' into feature/declaration-block-nesting-at-rule-required-list
2 parents f4000e8 + a282f6c commit 6260d46

File tree

15 files changed

+348
-33
lines changed

15 files changed

+348
-33
lines changed

.changeset/clear-suns-trade.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/easy-oranges-punch.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fair-sloths-visit.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/modern-days-try.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/smooth-lies-sin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tangy-wombats-kiss.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 16.23.1 - 2025-08-07
4+
5+
It fixes 7 bugs.
6+
7+
- Fixed: `no-invalid-position-declaration` false positives for embedded styles ([#8701](https://github.com/stylelint/stylelint/pull/8701)) ([@sw1tch3roo](https://github.com/sw1tch3roo)).
8+
- Fixed: `property-no-deprecated` erroneously autofixing `clip` ([#8699](https://github.com/stylelint/stylelint/pull/8699)) ([@immitsu](https://github.com/immitsu)).
9+
- Fixed: `property-no-deprecated` false positives for `-webkit-box-orient: vertical;` ([#8699](https://github.com/stylelint/stylelint/pull/8699)) ([@immitsu](https://github.com/immitsu)).
10+
- Fixed: `selector-pseudo-*-no-unknown` false positives for some meter pseudo classes/elements ([#8708](https://github.com/stylelint/stylelint/pull/8708)) ([@Mouvedia](https://github.com/Mouvedia)).
11+
- Fixed: `selector-pseudo-class-no-unknown` false positives for `:unchecked` ([#8705](https://github.com/stylelint/stylelint/pull/8705)) ([@Mouvedia](https://github.com/Mouvedia)).
12+
- Fixed: `selector-pseudo-element-no-unknown` false positives for `::search-text` ([#8707](https://github.com/stylelint/stylelint/pull/8707)) ([@Mouvedia](https://github.com/Mouvedia)).
13+
- Fixed: `selector-type-no-unknown` false positives for `selectedcontent` ([#8716](https://github.com/stylelint/stylelint/pull/8716)) ([@Mouvedia](https://github.com/Mouvedia)).
14+
315
## 16.23.0 - 2025-07-29
416

517
It adds 5 new rules, 1 option to a rule and fixes 3 bugs. We've turned on the new rules in our [standard config](https://www.npmjs.com/package/stylelint-config-standard).

lib/rules/no-invalid-position-declaration/__tests__/index.mjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { stripIndent } from 'common-tags';
22

3+
import naiveCssInJs from '../../../__tests__/fixtures/postcss-naive-css-in-js.cjs';
34
import rule from '../index.mjs';
45
const { messages, ruleName } = rule;
56

@@ -316,3 +317,38 @@ testRule({
316317
},
317318
],
318319
});
320+
321+
testRule({
322+
ruleName,
323+
config: true,
324+
customSyntax: 'postcss-html',
325+
accept: [
326+
{
327+
code: '<a style="color: red"></a>',
328+
description: 'HTML style attribute',
329+
},
330+
],
331+
reject: [
332+
{
333+
skip: true,
334+
code: '<style>color: red</style>',
335+
message: messages.rejected,
336+
line: 1,
337+
column: 6,
338+
endLine: 1,
339+
endColumn: 10,
340+
},
341+
],
342+
});
343+
344+
testRule({
345+
ruleName,
346+
config: true,
347+
customSyntax: naiveCssInJs,
348+
accept: [
349+
{
350+
code: 'css` color: red; `;',
351+
description: 'CSS-in-JS template literal',
352+
},
353+
],
354+
});

lib/rules/no-invalid-position-declaration/index.cjs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/rules/no-invalid-position-declaration/index.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { isAtRule, isRule } from '../../utils/typeGuards.mjs';
22
import findNodeUpToRoot from '../../utils/findNodeUpToRoot.mjs';
3+
import isInDocument from '../../utils/isInDocument.mjs';
34
import isStandardSyntaxDeclaration from '../../utils/isStandardSyntaxDeclaration.mjs';
45
import { nestingSupportedAtKeywords } from '../../reference/atKeywords.mjs';
56
import report from '../../utils/report.mjs';
@@ -24,6 +25,9 @@ const rule = (primary) => {
2425
if (!validOptions) return;
2526

2627
root.walkDecls((decl) => {
28+
// Skip checking declarations in embedded styles
29+
if (isInDocument(decl)) return;
30+
2731
if (!isStandardSyntaxDeclaration(decl)) return;
2832

2933
const { parent } = decl;

0 commit comments

Comments
 (0)