Skip to content

Customization

To customize the styles applied to your Starlight site when using the Starlight Catppuccin theme, you can provide additional CSS files to modify or extend the Starlight and Starlight Catppuccin theme default styles.

Learn more about custom CSS in the Starlight documentation.

Like Starlight, the Starlight Catppuccin theme uses cascade layers internally to manage the order of its styles. This ensures a predictable CSS order and allows for simpler overrides. Any custom unlayered CSS will override the default styles from Starlight and the Starlight Catppuccin theme.

If you are using cascade layers, you can use @layer in your custom CSS to define the order of precedence for different layers relative to styles from the starlight and catppuccin layers:

src/styles/custom.css
@layer my-reset, starlight, catppuccin, my-overrides;

The example above defines a custom layer named my-reset, applied before all the Starlight and Starlight Catppuccin theme layers, and another named my-overrides, applied after all Starlight and Starlight Catppuccin theme layers. Any styles in the my-overrides layer would take precedence over the Starlight and Starlight Catppuccin theme styles, but Starlight or the Starlight Catppuccin theme could still change styles set in the my-reset layer.