Skip to content

Commit fd5ed2e

Browse files
committed
Add more tests to cover scenarios related to issue sveltejs#3544
1 parent b1a8297 commit fd5ed2e

File tree

7 files changed

+51
-7
lines changed

7 files changed

+51
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.root.svelte-xyz p{color:red}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="root svelte-xyz">
2+
<section class="whatever svelte-xyz">
3+
</section>
4+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script>
2+
export let unknown1 = 'root';
3+
export let unknown2 = 'whatever';
4+
</script>
5+
6+
<style>
7+
.root :global(p) {
8+
color: red;
9+
}
10+
</style>
11+
12+
<div class={unknown1}>
13+
<section class={unknown2}>
14+
<!-- injected somehow -->
15+
</section>
16+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html body .root.svelte-xyz p.svelte-xyz{color:red}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="root svelte-xyz">
2+
<section class="whatever svelte-xyz">
3+
<p class="svelte-xyz">hello</p>
4+
</section>
5+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script>
2+
export let unknown1 = 'root';
3+
export let unknown2 = 'whatever';
4+
</script>
5+
6+
<style>
7+
:global(html) :global(body) .root p {
8+
color: red;
9+
}
10+
</style>
11+
12+
<div class={unknown1}>
13+
<section class={unknown2}>
14+
<p>hello</p>
15+
</section>
16+
</div>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<script>
2-
export let unknown = 'whatever';
2+
export let unknown1 = 'root';
3+
export let unknown2 = 'whatever';
34
</script>
45

5-
<div class='root'>
6-
<section class='{unknown}'>
7-
<p>hello</p>
8-
</section>
9-
</div>
10-
116
<style>
127
.root p {
138
color: red;
149
}
1510
</style>
11+
12+
<div class={unknown1}>
13+
<section class={unknown2}>
14+
<p>hello</p>
15+
</section>
16+
</div>

0 commit comments

Comments
 (0)