Skip to content

Code component does not display correctly with emitExternalStylesheet: false #3207

Open
@zlataovce

Description

@zlataovce

What version of starlight are you using?

0.34.3

What version of astro are you using?

5.7.13

What package manager are you using?

pnpm

What operating system are you using?

Linux (Fedora 42)

What browser are you using?

Firefox 138

Describe the Bug

Not sure if I'm missing something or if this issue would be better suited for the Expressive Code repo, but using the Code component when expressiveCode.emitExternalStylesheet is set to false breaks its styling completely.

Oddly enough, the issue seems to go away when you also include any Markdown/MDX code block on the page.

Image

Image

Link to Minimal Reproducible Example

https://github.com/zlataovce/ec-stylesheet-reproducer

Participation

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

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