Skip to content

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

Closed

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.

Activity

  1. added
    - P4: important
    on Mar 13, 2025
  2. removed
    triage: needs triage
    on Mar 13, 2025
  3. added
    feat: styling
    on Mar 13, 2025
  4. self-assigned this
    on Mar 13, 2025
  5. ematipico commented on Mar 13, 2025

    @ematipico
    Member

    Hey @widal001 , sorry about the inconvenience. Can you test this preview release and see if that fixes your issue?

    npm i https://pkg.pr.new/astro@13420
  6. ematipico commented on Mar 13, 2025

    @ematipico
    Member

    I got confirmation from @HiDeoo that the preview release fixes the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

- P4: importantfeat: stylingregression

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions