Skip to content

Commit 63a5f8a

Browse files
committed
Added test for issue sveltejs#3544
1 parent 5e2c524 commit 63a5f8a

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/* generated by Svelte vX.Y.Z */
2+
import {
3+
SvelteComponent,
4+
append,
5+
attr,
6+
detach,
7+
element,
8+
init,
9+
insert,
10+
noop,
11+
safe_not_equal
12+
} from "svelte/internal";
13+
14+
function add_css() {
15+
var style = element("style");
16+
style.id = 'svelte-1l99rp3-style';
17+
style.textContent = ".root.svelte-1l99rp3 i.svelte-1l99rp3{color:red}";
18+
append(document.head, style);
19+
}
20+
21+
// (8:1) {#if true}
22+
function create_if_block(ctx) {
23+
var span;
24+
25+
return {
26+
c() {
27+
span = element("span");
28+
span.innerHTML = `<i class="svelte-1l99rp3">hello</i>`;
29+
attr(span, "class", "" + (`test`) + " svelte-1l99rp3");
30+
},
31+
32+
m(target, anchor) {
33+
insert(target, span, anchor);
34+
},
35+
36+
d(detaching) {
37+
if (detaching) {
38+
detach(span);
39+
}
40+
}
41+
};
42+
}
43+
44+
function create_fragment(ctx) {
45+
var div;
46+
47+
var if_block = (true) && create_if_block(ctx);
48+
49+
return {
50+
c() {
51+
div = element("div");
52+
if (if_block) if_block.c();
53+
attr(div, "class", "root svelte-1l99rp3");
54+
},
55+
56+
m(target, anchor) {
57+
insert(target, div, anchor);
58+
if (if_block) if_block.m(div, null);
59+
},
60+
61+
p: noop,
62+
i: noop,
63+
o: noop,
64+
65+
d(detaching) {
66+
if (detaching) {
67+
detach(div);
68+
}
69+
70+
if (if_block) if_block.d();
71+
}
72+
};
73+
}
74+
75+
class Component extends SvelteComponent {
76+
constructor(options) {
77+
super();
78+
if (!document.getElementById("svelte-1l99rp3-style")) add_css();
79+
init(this, options, null, create_fragment, safe_not_equal, []);
80+
}
81+
}
82+
83+
export default Component;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<style>
2+
.root i {
3+
color: red;
4+
}
5+
</style>
6+
7+
<div class="root">
8+
{#if true}
9+
<span class={`test`}>
10+
<i>hello</i>
11+
</span>
12+
{/if}
13+
</div>

0 commit comments

Comments
 (0)