named-slots icon indicating copy to clipboard operation
named-slots copied to clipboard

Do not slot empty or whitespace-only text nodes.

Open treshugart opened this issue 8 years ago • 3 comments

I don't want to have to do this, but I don't know of a good algorithm to determine if whitespace should be part of a slot. The problem comes when you write HTML; your indentation and new lines get treated as light DOM and slotted into a default slot unless you either require a named slot, or do this.

treshugart avatar Mar 31 '16 06:03 treshugart

@nadiam84 what do you think about this? I know we've talked about it in the past. I don't believe the spec is particular about this.

treshugart avatar Jun 08 '16 12:06 treshugart

@treshugart since there is nothing about this in the spec, and since we have no obvious way to determine which decision would be right, I'd say go with the easiest solution. Which is leave things as they are now, i.e. don't slot empty text-nodes.

adevnadia avatar Jun 09 '16 11:06 adevnadia

Sounds good to me :)

On Thu, 9 Jun 2016, 21:33 nadiam84 [email protected] wrote:

@treshugart https://github.com/treshugart since there is nothing about this in the spec, and since we have no obvious way to determine which decision would be right, I'd say go with the easiest solution. Which is leave things as they are now, i.e. don't slot empty text-nodes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/skatejs/named-slots/issues/23#issuecomment-224869393, or mute the thread https://github.com/notifications/unsubscribe/AAIVbAlkpLkuyLiPz1vIuQ95WXKwvs1Pks5qJ_oWgaJpZM4H8c-b .

treshugart avatar Jun 09 '16 14:06 treshugart