Closed TheComputerM closed 3 years ago
Somewhat like https://github.com/sveltejs/svelte/pull/4556
I was just going to link that – what are the differences? It looks like this is implemented as described
This is still incomplete and I am brain storming on better syntax. The goal of it is to provide a more svelte like syntax and some additional features also such as slot options:
<Component>
<svelte:fragment dense={true}>
This will do something in the component
</svelte:fragment>
</Component>
Wouldn't slots just be a portal for where to render? The contents of what is rendered is determined by the content itself.
As far as I understand it, this RFC seems to be mostly about using svelte:fragment
to render text nodes (non-component and non-element) with siblings.
I have an RFC open about inheriting <slot/>
attributes (#15)
But (imo) if you're passing dense={true}
so that the slot can react/alter its display, then I think that falls more into svelte:template
territory (#34).
But, I might be misunderstanding you completely. I'm sorta guessing at the examples
Yeah, sorry for the short explanation. Was thinking more on the lines of something like this: The syntax is just for better understanding.
<svelte:slot tag={ListItem} export:dense on:click={func}>
Default
</svelte:slot>
<svelte:fragment dense={true}>
Content
</svelte:fragment>
<ListItem dense={true} on:click={func}>
Content
</ListItem>
This was mainly intended to solve https://github.com/sveltejs/svelte/issues/2079 and add some new features.
No problem
Yeah, to me that's 100% an inline component, if not an external component. Either of which only get placed by a <slot>
Rendered
This is my first RFC so please comment any helpful suggestions.