Skip to content

Inline layout affected by #if block after #each #17991

@Kabakuro

Description

@Kabakuro

Describe the bug

Having an #if block after an #each block seems to cause this weird rendering behaviour with inline elements (haven't gotten as far as testing with anything else).

The #if block, regardless of being truthy or falsy, creates some sort of unexpected spacing in the output.

I pasted an example below in the reproduction. You can see what happens if you comment out the #if block in Element.svelte.

Reproduction

https://svelte.dev/playground/28de6bf5d55840348727c1c66036551e?version=5.55.0

Logs

System Info

System:
    OS: Linux 6.14 Linux Mint 22.2 (Zara)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 16.92 GB / 31.25 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 20.19.5 - /home/henry/.nvm/versions/node/v20.19.5/bin/node
    npm: 10.8.2 - /home/henry/.nvm/versions/node/v20.19.5/bin/npm
    pnpm: 10.22.0 - /home/henry/.nvm/versions/node/v20.19.5/bin/pnpm
  Browsers:
    Chrome: 145.0.7632.116
    Firefox: 144.0.2
    Firefox Developer Edition: 144.0.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions