---
title: "Whitespace in Astro 7.0"
url: https://daily.dev/posts/whitespace-in-astro-7-0-zbbdqcgua
source_url: https://cassidoo.co/post/astro-7-whitespace
type: article
source: "Cassidy's blog"
author: "Cassidy Williams"
published: 2026-06-30T20:13:43.438Z
updated: 2026-07-01T17:00:10.078Z
tags: ["rust", "astro", "jsx"]
reading_time: 2
upvotes: 3
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Whitespace in Astro 7.0

**[Cassidy's blog](https://daily.dev/sources/cassidoo)** · [@cassidoo](https://daily.dev/cassidoo) · 2 min read · 3 upvotes · 0 comments

## Summary

Astro 7.0 introduced a new Rust-based compiler that changes how whitespace between adjacent JSX elements is handled. Previously, adjacent elements like two spans would render with a space between them; now they render without any space. The fix is either to explicitly add {' '} between elements (JSX-style) or to set compressHTML: true in astro.config.mjs, which restores the previous spacing behavior without requiring changes to every component.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cassidoo.co/post/astro-7-whitespace>

## Similar posts on daily.dev

- [Astro Markdown Component Utility for Any Framework](https://daily.dev/posts/astro-markdown-component-utility-for-any-framework-a3pozu8o7) · CSS-Tricks · 3 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#astro](https://daily.dev/tags/astro), [#jsx](https://daily.dev/tags/jsx)

[View this post on daily.dev](https://daily.dev/posts/whitespace-in-astro-7-0-zbbdqcgua)
