File size: 1,219 Bytes
c63ff03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
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                   |