Skip to content

Instantly share code, notes, and snippets.

@darvid
Last active December 19, 2023 02:04
Show Gist options
  • Save darvid/2b1bc50d77831c5a1422be87bec8e3ef to your computer and use it in GitHub Desktop.
Save darvid/2b1bc50d77831c5a1422be87bec8e3ef to your computer and use it in GitHub Desktop.
πŸˆβ€β¬› πŸ“’ πŸŒ™ catppuccin CSS color variables + Obsidian Mermaid theming
/* catppuccin mocha πŸˆβ€β¬› πŸŒ™ */
:root {
--mocha-rosewater: #f5e0dc;
--mocha-flamingo: #f2cdcd;
--mocha-pink: #f5c2e7;
--mocha-mauve: #cba6f7;
--mocha-red: #f38ba8;
--mocha-maroon: #eba0ac;
--mocha-peach: #fab387;
--mocha-yellow: #f9e2af;
--mocha-green: #a6e3a1;
--mocha-teal: #94e2d5;
--mocha-sky: #89dceb;
--mocha-sapphire: #74c7ec;
--mocha-blue: #89b4fa;
--mocha-lavender: #b4befe;
--mocha-text: #cdd6f4;
--mocha-subtext1: #bac2de;
--mocha-subtext0: #a6adc8;
--mocha-overlay2: #9399b2;
--mocha-overlay1: #7f849c;
--mocha-overlay0: #6c7086;
--mocha-surface2: #585b70;
--mocha-surface1: #45475a;
--mocha-surface0: #313244;
--mocha-base: #1e1e2e;
--mocha-mantle: #181825;
--mocha-crust: #11111b;
}
/* mermaid color overrides for Obsidian, since normal Mermaidjs theming doesn't work 😟 */
@import "./colors";
.mermaid svg {
display: block;
height: auto;
margin: auto;
}
.theme-dark .mermaid .quadrant:nth-child(1) rect {
fill: var(--mocha-surface0);
}
.theme-dark .mermaid .quadrant:nth-child(2) rect {
fill: var(--mocha-surface1);
}
.theme-dark .mermaid .quadrant:nth-child(3) rect {
fill: var(--mocha-surface2);
}
.theme-dark .mermaid .quadrant:nth-child(4) rect {
fill: var(--mocha-surface3);
}
.theme-dark .mermaid .quadrant:nth-child(4) text {
fill: var(--mocha-crust) !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment