#Increase width of guide page when using astro starlight?
3 messages · Page 1 of 1 (latest)
Hi @upper jacinth. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
You can increase the width of a guide page in Astro's Starlight theme by providing additional CSS files to modify or extend Starlight’s default styles. Here are the steps:
- Add a CSS file to your
src/directory. For example, you could set a wider default column width like this:
:root {
--sl-content-width: 50rem;
}
This code should be placed in a file like src/styles/custom.css.
- Add the path to your CSS file to Starlight’s
customCssarray inastro.config.mjs:
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
export default defineConfig({
integrations: [
starlight({
title: 'Docs With Custom CSS',
customCss: [
// Relative path to your custom CSS file
'./src/styles/custom.css',
],
}),
],
});
You can see all the CSS custom properties used by Starlight that you can set to customize your site in the props.css file on GitHub (https://github.com/withastro/starlight/blob/main/packages/starlight/style/props.css).