Skip to content

Commit 55377c7

Browse files
authored
Fix selector-pseudo-class-no-unknown false positives for :heading (#8749)
1 parent cfbe772 commit 55377c7

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

.changeset/yummy-actors-serve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stylelint": patch
3+
---
4+
5+
Fixed: `selector-pseudo-class-no-unknown` false positives for `:heading`

lib/reference/selectors.cjs

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

lib/reference/selectors.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ export const pseudoClasses = uniteSets(
421421
'fullscreen',
422422
'future',
423423
'has-slotted',
424+
'heading',
424425
'high-value',
425426
'host-context',
426427
'host',

lib/rules/selector-pseudo-class-no-unknown/__tests__/index.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ testRule({
7171
{
7272
code: ':--heading { }',
7373
},
74+
{
75+
code: ':heading, :heading(1, 4), :heading(odd) { }',
76+
},
7477
{
7578
code: '::-webkit-scrollbar-thumb:window-inactive { }',
7679
},

0 commit comments

Comments
 (0)