mirror of https://github.com/sveltejs/svelte
fix: ensure comma is also pruned if necessary (#14032)
immediately after merging #14006 I noticed there's a bug when pruning one selector in a list of several; this fixes it no changeset because not released yetchange-effect-sequence
parent
435a9c1cd0
commit
f52a30347f
@ -0,0 +1,8 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
// test checks that minification works correctly
|
||||
compileOptions: {
|
||||
css: 'external'
|
||||
}
|
||||
});
|
@ -0,0 +1 @@
|
||||
<!--[--><div class="foo svelte-mnmfn6">foo</div><!--]-->
|
@ -0,0 +1 @@
|
||||
<style id="svelte-mnmfn6">.foo.svelte-mnmfn6 {color:green;}.foo.svelte-mnmfn6 {color:green;}</style>
|
@ -0,0 +1,23 @@
|
||||
<svelte:options css="injected" />
|
||||
|
||||
<div class="foo">foo</div>
|
||||
|
||||
<style>
|
||||
.foo {
|
||||
color: green;
|
||||
}
|
||||
.unused {
|
||||
color: red;
|
||||
}
|
||||
.unused {
|
||||
.nested-unused {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.unused:has(.unused) {
|
||||
color: red;
|
||||
}
|
||||
.foo, .unused {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
@ -1 +1 @@
|
||||
<!--[--><div class="bar svelte-1fs6vx">bar</div><!----> <div class="foo svelte-sg04hs">foo</div><!--]-->
|
||||
<!--[--><div class="bar svelte-ievf05">bar</div><!----> <div class="foo svelte-sg04hs">foo</div><!--]-->
|
@ -1 +1 @@
|
||||
<style id="svelte-1fs6vx">.bar.svelte-1fs6vx {color:red;}</style>
|
||||
<style id="svelte-ievf05">.bar.svelte-ievf05 {color:red;}</style>
|
Loading…
Reference in new issue