You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using named slots and default slots together, it is a bit hard to figure out the boundaries and whitespaces of the default slot:
<Component><span>some code for default slot here</span><divslot="a"></div><span>some code for default slot here 2</span><divslot="b"></div>
some code for default slot here 3
</Component>
// default slot should contain
<span>some code for default slot here</span><span>some code for default slot here 2</span>
some code for default slot here 3
although it works, but it is messy. and it is hard to determine whether there's default slot in the first place, for example:
<Component><divslot="a"></div><!-- some white space --><divslot="b"></div></Component>
Describe the solution you'd like
With #4556, we should complain if there's a mix of named slots and default slots, and encourage the user to use <svelte:slot slot="default"> and write:
<Component><divslot="a"></div><divslot="b"></div><svelte:slotslot="default"><span>some code for default slot here</span><span>some code for default slot here 2</span>
some code for default slot here 3
</svelte:slot></Component>
so, as long as there's name slot, any whitespace within the <Component> will not be considered.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
How important is this feature to you?
simpler and cleaner implementation of the slot mechanism
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
<Component>
<div slot="a">a</div>
<div slot="b">b</div>
<svelte:fragment slot="default">
<span>some code for default slot here</span>
<span>some code for default slot here 2</span>
some code for default slot here 3
</svelte:fragment>
</Component>
Is your feature request related to a problem? Please describe.
When using named slots and default slots together, it is a bit hard to figure out the boundaries and whitespaces of the default slot:
// default slot should contain
although it works, but it is messy. and it is hard to determine whether there's default slot in the first place, for example:
Describe the solution you'd like
With #4556, we should complain if there's a mix of named slots and default slots, and encourage the user to use
<svelte:slot slot="default">
and write:so, as long as there's name slot, any whitespace within the
<Component>
will not be considered.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
How important is this feature to you?
simpler and cleaner implementation of the slot mechanism
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: