mirror of https://github.com/sveltejs/svelte
[fix] applying :global for > combinator (#6563)
parent
69e3c0fe7f
commit
ee769101fc
@ -0,0 +1,27 @@
|
|||||||
|
export default {
|
||||||
|
warnings: [
|
||||||
|
{
|
||||||
|
code: 'css-unused-selector',
|
||||||
|
end: {
|
||||||
|
character: 111,
|
||||||
|
column: 21,
|
||||||
|
line: 8
|
||||||
|
},
|
||||||
|
frame: `
|
||||||
|
6: color: red;
|
||||||
|
7: }
|
||||||
|
8: a:global(.foo) > div {
|
||||||
|
^
|
||||||
|
9: color: red;
|
||||||
|
10: }
|
||||||
|
`,
|
||||||
|
message: 'Unused CSS selector "a:global(.foo) > div"',
|
||||||
|
pos: 91,
|
||||||
|
start: {
|
||||||
|
character: 91,
|
||||||
|
column: 1,
|
||||||
|
line: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div>div.svelte-xyz.svelte-xyz{color:red}div.svelte-xyz.foo>div.svelte-xyz{color:red}
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class="svelte-xyz">
|
||||||
|
<div class="svelte-xyz"></div>
|
||||||
|
</div>
|
@ -0,0 +1,15 @@
|
|||||||
|
<style>
|
||||||
|
:global(div) > div {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
div:global(.foo) > div {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
a:global(.foo) > div {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div />
|
||||||
|
</div>
|
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
warnings: []
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
a>b>div.svelte-xyz{color:red}
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class="svelte-xyz">
|
||||||
|
<div class="svelte-xyz"></div>
|
||||||
|
</div>
|
@ -0,0 +1,9 @@
|
|||||||
|
<style>
|
||||||
|
:global(a) > :global(b) > div {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div />
|
||||||
|
</div>
|
@ -0,0 +1,3 @@
|
|||||||
|
<div class="svelte-xyz">
|
||||||
|
<div class="svelte-xyz"></div>
|
||||||
|
</div>
|
Loading…
Reference in new issue