🚧 Rspress 2.0 document is under development
close

CSS variables

🚧 Work in progress

Rspress exposes commonly used CSS variables. Overriding variables is simpler and more maintainable than replacing the built-in React components.

You can edit and preview in real time on this page, then copy the result to theme/index.css to override styles. Here is a simple example of style overriding:

theme/index.tsx
theme/index.css
import './index.css';
export * from '@rspress/core/theme';

Below are some CSS variables provided by Rspress and their default values:

Brand colors

Codeblock - shiki theme

Codeblock - outer title and container

foo.ts
console.log('This is a code block');

Default homepage

Base variables