Skip to content

Instantly share code, notes, and snippets.

@slnc
Last active April 28, 2024 08:14
Show Gist options
  • Save slnc/c58120041dab4be951b1b30f9e7e34af to your computer and use it in GitHub Desktop.
Save slnc/c58120041dab4be951b1b30f9e7e34af to your computer and use it in GitHub Desktop.
Obsidian CSS snippet to get VSCode Light Modern and Dark (Visual Studio) syntax highlighting colors
/* Obsidian CSS Snippet to approximate VSCode's "Light Modern" and
* "Dark (Visual Studio)" themes.
*
* Imperfect match because of Obsidian's coarser syntax coloring system.
*/
.theme-light {
--code-normal: #292929;
--code-comment: #008000;
--code-function: #7a5f26;
--code-important: #d16969;
--code-keyword: #af00dc;
--code-operator: #000000;
--code-property: #010f80;
--code-punctuation: #569cd6;
--code-string: #a31515;
--code-tag: #569cd6;
--code-value: #0a8659;
--code-background: #f4f4f4;
}
.theme-dark {
--code-normal: #d4d4d4;
--code-comment: #6a9a56;
--code-function: #d4d4d4;
--code-important: #d16969;
--code-keyword: #569cd6;
--code-operator: #d4d4d4;
--code-property: #d4d4d4;
--code-punctuation: #569cd6;
--code-string: #cf9178;
--code-tag: #b5cea8;
--code-value: #b5cea8;
--code-background: #1e1e1e;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment