Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slots remove whitespace where it shouldn't when <style> is used #1065

Open
1 task
Lectem opened this issue Feb 8, 2025 · 0 comments
Open
1 task

Slots remove whitespace where it shouldn't when <style> is used #1065

Lectem opened this issue Feb 8, 2025 · 0 comments
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@Lectem
Copy link

Lectem commented Feb 8, 2025

Astro Info

Astro                    v5.2.5
Node                     v22.13.1
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Whitespaces are being stripped between multiple <span> elements when using Layout components (<slot>), if and only if a <style> is present.
This leads to inconsistent rendering between using slots and not using slots.

Weirdly, this is something that was discussed in withastro/astro#6893, and it was mentioned that astro not removing whitespaces was a feature !

What's the expected result?

Astro should have the same rendering results whether <slot/>/<style> are being used or not.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-wwx73rkk?file=src%2Fpages%2FindexWithLayout.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 8, 2025
@ascorbic ascorbic transferred this issue from withastro/astro Feb 10, 2025
@ascorbic ascorbic added - P3: minor bug An edge case that only affects very specific usage (priority) and removed needs triage Issue needs to be triaged labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants