fix tests using new add_css methods

pull/5639/head
Ivan Hofer 5 years ago
parent 9a4cf3c3f8
commit 83d5fe8256

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
addCssToComponent,
append,
appendStyleIfNotPresent,
attr,
detach,
element,
@ -13,11 +15,8 @@ import {
text
} from "svelte/internal";
function add_css() {
var style = element("style");
style.id = "svelte-1a7i8ec-style";
style.textContent = "p.svelte-1a7i8ec{color:red}";
append(document.head, style);
function add_css(customStyleTag) {
appendStyleIfNotPresent(customStyleTag || document.head, "svelte-1a7i8ec-style", "p.svelte-1a7i8ec{color:red}");
}
function create_fragment(ctx) {
@ -58,7 +57,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent {
constructor(options) {
super();
if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
addCssToComponent(this, add_css, options);
init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
}
}

@ -1,7 +1,8 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
append,
addCssToComponent,
appendStyleIfNotPresent,
attr,
detach,
element,
@ -11,11 +12,8 @@ import {
safe_not_equal
} from "svelte/internal";
function add_css() {
var style = element("style");
style.id = "svelte-1slhpfn-style";
style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}";
append(document.head, style);
function add_css(customStyleTag) {
appendStyleIfNotPresent(customStyleTag || document.head, "svelte-1slhpfn-style", "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}");
}
function create_fragment(ctx) {
@ -41,7 +39,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent {
constructor(options) {
super();
if (!document.getElementById("svelte-1slhpfn-style")) add_css();
addCssToComponent(this, add_css, options);
init(this, options, null, create_fragment, safe_not_equal, {});
}
}

Loading…
Cancel
Save