pull/15538/head
Rich Harris 4 months ago
parent 60813bc18d
commit 3afd814adc

@ -1,9 +1,7 @@
/** /** @import { ComponentContext, ComponentClientTransformState } from '../types.js' */
* @import { ComponentContext, ComponentClientTransformState } from "../types.js" /** @import { Identifier, Expression } from 'estree' */
* @import { Identifier, Expression } from "estree" /** @import { Namespace } from '#compiler' */
* @import { Namespace } from '#compiler' /** @import { SourceLocation } from '#shared' */
* @import { SourceLocation } from '#shared'
*/
import { dev } from '../../../../state.js'; import { dev } from '../../../../state.js';
import * as b from '../../../../utils/builders.js'; import * as b from '../../../../utils/builders.js';
import { template_to_functions } from './to-functions.js'; import { template_to_functions } from './to-functions.js';

@ -443,18 +443,16 @@ export function build_component(node, component_name, context, anchor = context.
if (context.state.metadata.namespace === 'svg') { if (context.state.metadata.namespace === 'svg') {
// this boils down to <g><!></g> // this boils down to <g><!></g>
context.state.template.create_element('g'); context.state.template.create_element('g');
context.state.template.push_element();
context.state.template.create_anchor();
context.state.template.pop_element();
} else { } else {
// this boils down to <svelte-css-wrapper style='display: contents'><!></svelte-css-wrapper> // this boils down to <svelte-css-wrapper style='display: contents'><!></svelte-css-wrapper>
context.state.template.create_element('svelte-css-wrapper'); context.state.template.create_element('svelte-css-wrapper');
context.state.template.set_prop('style', 'display: contents'); context.state.template.set_prop('style', 'display: contents');
context.state.template.push_element();
context.state.template.create_anchor();
context.state.template.pop_element();
} }
context.state.template.push_element();
context.state.template.create_anchor();
context.state.template.pop_element();
statements.push( statements.push(
b.stmt(b.call('$.css_props', anchor, b.thunk(b.object(custom_css_props)))), b.stmt(b.call('$.css_props', anchor, b.thunk(b.object(custom_css_props)))),
b.stmt(fn(b.member(anchor, 'lastChild'))), b.stmt(fn(b.member(anchor, 'lastChild'))),

Loading…
Cancel
Save