named-slots
named-slots copied to clipboard
Do not slot empty or whitespace-only text nodes.
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.
@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 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.
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 .