Skip to content

Styling discrepancies between astro dev and astro build in 5.4.3 #13416

@widal001

Description

@widal001

Astro Info

Astro                    v5.4.3
Node                     v20.18.1
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/starlight

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

No response

Describe the Bug

Summary

  • There are discrepancies between component styling in the output of astro dev (first screenshot) and astro build && astro preview (second screenshot)
  • Some key differences include:
    • Smaller search bar (not a big deal)
    • Different colored code blocks (big deal because it fails a11y checks)
  • This bug seems to be isolated to astro 5.4.3, because when I downgrade to 5.4.2 the outputs are the same.
  • The bump to astro 5.4.3 also seems to introduce some vite warnings in the build output which may be contributing to these styling discrepancies (third screenshot)

Screenshots

With astro dev

Image

With astro build && astro preview

Image

Build output

Image

Relevant links

I'm perma-linking to the commit where the bug was introduced in my repo. I'll put together a simpler version re-creating the issue later today when I have more time!

What's the expected result?

The output of astro dev and astro build && astro preview should be the same

Link to Minimal Reproducible Example

https://github.com/HHS/simpler-grants-protocol/tree/eb411fe1466b7bb250dc68880baeb3a5831229d9/website

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)feat: stylingRelated to styles (scope)regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions