mirror of https://github.com/sveltejs/svelte
fix: allow for nesting selector in pseudoclasses (#13209)
Fixes #13203 The problem is that we were checking for NestingSelectors only in the selectors of the immediate child of the selectors. Since Nesting could be in selectors like :is or :where or :has that can also be nested i think we need to walk the selectors to find if there's a selector or not.pull/13216/head
parent
91299b32ff
commit
e9dc118eb7
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: allow for nesting selector in pseudoclasses
|
@ -0,0 +1,5 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
warnings: []
|
||||
});
|
@ -0,0 +1,6 @@
|
||||
|
||||
nav.svelte-xyz{
|
||||
header:where(.svelte-xyz):has(&){
|
||||
color: red;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<header class="svelte-xyz"><nav class="svelte-xyz"></nav></header>
|
@ -0,0 +1,11 @@
|
||||
<header>
|
||||
<nav></nav>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
nav{
|
||||
header:has(&){
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue