Spaces:
Sleeping
Sleeping
cssClass: reference | |
This page lists CSS variables for code. | |
## CSS variables | |
| Variable | Description | | |
| -------------------- | --------------------- | | |
| `--code-background` | Code background color | | |
| `--code-white-space` | Code `white-space` | | |
| `--code-size` | Code font size | | |
### Syntax highlighting | |
> [!note] | |
> Since Obsidian uses two different libraries for syntax highlighting—one for Editing view and another for Reading view—styling may not match perfectly between the two. | |
| Variable | Description | | |
| -------------------- | ------------------------ | | |
| `--code-normal` | Non-highlighted syntax | | |
| `--code-comment` | Comments | | |
| `--code-function` | Functions | | |
| `--code-important` | Important, regex | | |
| `--code-keyword` | Keywords | | |
| `--code-operator` | Operators | | |
| `--code-property` | Properties | | |
| `--code-punctuation` | Punctuation | | |
| `--code-string` | Strings | | |
| `--code-tag` | Tags, symbols, constants | | |
| `--code-value` | Values | | |