Skip to content

Commit ad4c3a7

Browse files
author
mkb
committed
fix: change from scss variables to css variables and appearance fixes.
1 parent a610002 commit ad4c3a7

18 files changed

+1019
-809
lines changed

README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
## About
1919

20-
This theme covers my use case for the app. That said! Part of what makes Obsidian so fantastic is its many features and extended universe of user-created plugins. As time goes on, I would like to add more compatibility between the theme and some of the more popular plugins. Additionally, Obsidian now has a legacy editor. There be dragons, but none too bad: Most of the css was written before the new editor's beta. Currently the theme uses css from [Kepano's Hider](https://github.com/kepano/obsidian-hider) plugin. That will change soon, but you may need to do some cmd/ctrl+p-ing in the meantime if you are used to buttons. (:
20+
This theme covers my use case for the app. That said! Part of what makes Obsidian so fantastic is its many features and extended universe of user-created plugins. As time goes on, I would like to add more compatibility between the theme and some of the more popular plugins. Additionally, Obsidian now has a legacy editor. There be dragons, but none too bad: Most of the css was written before the new editor's beta. Currently the theme uses some css from [Kepano's Hider](https://github.com/kepano/obsidian-hider) plugin. That will change soon, but you may need to do some cmd/ctrl+p-ing in the meantime if you are used to buttons. (:
2121

2222
## Usage
2323

@@ -35,21 +35,17 @@ Open Obisidian and go to `Preferences` >> `Appearance`, click `Manage` and scrol
3535

3636
## Development
3737

38+
See the [Releases](https://github.com/catppuccin/obsidian/releases) page for the latest news.
39+
3840
### The shape of things to come
3941

40-
+ [ ] Style Settings plugin compatibility
42+
+ [x] Style Settings plugin compatibility
43+
+ [x] Behind the scenes cleanup of scss/css
4144
+ [ ] Tweaks to improve theme consistency throughout UI
42-
+ [ ] Behind the scenes cleanup of scss/css
4345
+ [ ] Mobile version
4446

4547
PRs and constructive feedback more than welcome.
4648

47-
### Known issues
48-
49-
* Bullet indentations under checkboxes are not deep enough
50-
* Some infrequently seen icons still need to be styled/replaced
51-
* Legacy editor blockquote is not consistent with the new editor's
52-
5349
## 💝 Thanks to
5450

5551
+ [mbeckrich](https://github.com/mbeckrich)

obsidian.css

+409-252
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/_base.scss

+3-8
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,25 @@
33
/* @use "abstracts/colors"; */
44

55
@use "abstracts/fonts";
6-
7-
@use "abstracts/mixins";
8-
9-
@use "base/codeblocks";
6+
@use "abstracts/variables";
7+
@use "base/admonitions-and-codeblocks";
108
@use "base/links";
119
@use "base/typography";
12-
1310
@use "components/icons";
1411
@use "components/lines";
15-
1612
@use "layouts/input-and-buttons";
1713
@use "layouts/settings";
1814
@use "layouts/sidebar";
1915
@use "layouts/tabs";
2016
@use "layouts/titlebar";
21-
2217
@use "vendors/plugins";
2318
@use "vendors/style-settings";
2419

2520
/* stylelint-disable property-no-vendor-prefix */
2621
:root {
2722
--default-font: "Vollkorn", "Gentium Book Basic", -apple-system, blinkmacsystemfont, "Segoe UI", "Microsoft YaHei Light", sans-serif;
2823
--font-monospace: "Mononoki Nerd Font Mono", sfmono-regular, consolas, "Roboto Mono", monospace;
29-
--not-editor: "Public Sans", "Gill Sans", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
24+
--not-editor: "Public Sans", "Gill Sans", -apple-system, system-ui, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
3025
--preview-font: var(--default-font);
3126
--editor-font: var(--default-font);
3227
--header-font-pre: var(--preview-font);

scss/abstracts/_colors.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* make any changes to colors in base.scss. instead */
1+
/* make any changes to colors in base.scss instead */
22

33
/* cursor, urls */
44
$rosewater: hsl(10deg 56% 91%);
@@ -8,7 +8,7 @@ $mauve: hsl(279deg 70% 83%);
88
/* active tab in foreground */
99
$pink: hsl(316deg 72% 86%);
1010
$maroon: hsl(349deg 60% 77%);
11-
$red: hsl(342deg 79% 75%);
11+
$red: hsl(342deg 80% 75%);
1212
$peach: hsl(24deg 88% 78%);
1313
$yellow: hsl(41deg 88% 84%);
1414
$green: hsl(128deg 58% 79%);

scss/abstracts/_fonts.scss

+180-180
Large diffs are not rendered by default.

scss/abstracts/_mixins.scss

-4
This file was deleted.

scss/abstracts/_variables.scss

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
:root {/* Dark theme colors, adjust in _base.scss for now. */
2+
--background-primary: hsl(240deg 21% 15%);
3+
--background-primary-alt: hsl(249deg 23% 12%);
4+
--background-secondary: hsl(240deg 21% 15%);
5+
--background-secondary-alt: hsl(249deg 23% 12%);
6+
--background-modifier-border: hsl(249deg 23% 12%);
7+
--background-modifier-form-field: hsl(235deg 17% 29% 30%);
8+
--background-modifier-form-field-highlighted: hsl(235deg 17% 29% 30%);
9+
--background-modifier-box-shadow: hsl(235deg 17% 29% 30%);
10+
--background-modifier-success: hsl(128deg 58% 79%);
11+
--background-modifier-error: hsl(342deg 79% 75%);
12+
--background-modifier-error-rgb: 226 140 140;
13+
--background-modifier-error-hover: hsl(342deg 79% 60%);
14+
--background-modifier-cover: rgb(0 0 0 80%);
15+
--text-accent: hsl(128deg 58% 79%);
16+
--text-accent-hover: hsl(128deg 58% 79%);
17+
--text-normal: hsl(220deg 38% 89%);
18+
--text-normal-transparent: hsl(220deg 38% 89% / 60%);
19+
--text-muted: hsl(285deg 10% 75%);
20+
--text-muted-rgb: 195, 186, 198;
21+
--text-faint: hsl(274deg 11% 59%);
22+
--text-error: hsl(342deg 79% 75%);
23+
--text-error-hover: hsl(342deg 79% 60%);
24+
--text-highlight-bg: hsl(41deg 88% 84%);
25+
--text-highlight-bg-active: hsl(223.2deg 70.1% 79%);
26+
--text-selection: hsl(254deg 12% 36%);
27+
--text-on-accent: hsl(254deg 25% 10%);
28+
--interactive-normal: hsl(171deg 53% 81%);
29+
--interactive-hover: hsl(171deg 53% 81%);
30+
--interactive-accent: hsl(128deg 58% 79%);
31+
--interactive-accent-rgb: 171, 233, 179;
32+
--interactive-accent-hover: hsl(128deg 58% 79%);
33+
--interactive-success: hsl(128deg 58% 79%);
34+
--scrollbar-active-thumb-bg: rgb(255 255 255 / 20%);
35+
--scrollbar-bg: rgb(255 255 255 / 5%);
36+
--scrollbar-thumb-bg: rgb(255 255 255 / 10%);
37+
--code-blocks: hsl(10deg 56% 91%);
38+
--border: hsl(249deg 18% 22%);
39+
--border-inset: hsl(254deg 12% 36%);
40+
--active-interaction: hsl(316deg 72% 86%);
41+
--highlight-mix-blend-mode: lighten;
42+
--internal-buttons: hsl(24deg 88% 78%);
43+
--text-selection-opaque: hsl(238deg 100% 89%);
44+
--rosewater: hsl(9deg 57% 91%);
45+
--maroon: hsl(349deg 61% 77%);
46+
--pink: hsl(316deg 72% 86%);
47+
--lavender: hsl(220deg 38% 89%);
48+
--black-0: hsl(254deg 25% 10%);
49+
--black-1: hsl(249deg 23% 12%);
50+
--black-2: hsl(240deg 21% 15%);
51+
--black-3: hsl(249deg 18% 22%);
52+
--black-4: hsl(254deg 12% 36%);
53+
54+
/* Link effects */
55+
--link-transition: background-color 0.3s ease-in-out, color 0.3s ease-in;
56+
57+
/* Box shadows */
58+
--box-shadow-inset-small: 0 2px 4px inset hsl(254deg 25% 10%);
59+
--box-shadow-inset-small-hover:
60+
0 2px 4px inset hsl(254deg 25% 10%),
61+
0 4px 8px inset hsl(254deg 25% 10%);
62+
--box-shadow-inset-large:
63+
0 2px 4px inset hsl(254deg 25% 10%),
64+
0 4px 8px inset hsl(254deg 25% 10%),
65+
0 8px 16px inset hsl(254deg 25% 10%);
66+
--box-shadow-large:
67+
0 0 4px hsl(254deg 25% 10%),
68+
0 0 8px hsl(254deg 25% 10%),
69+
0 0 16px hsl(254deg 25% 10%);
70+
--box-shadow-small:
71+
0 2px 2px hsl(254deg 25% 10%),
72+
0 4px 4px hsl(254deg 25% 10%);
73+
--box-shadow-small-hover:
74+
0 2px 2px hsl(254deg 25% 10%),
75+
0 4px 4px hsl(254deg 25% 10%);
76+
77+
/* Text */
78+
--text-underline: 2px;
79+
--text-decoration-standard: 0.15rem underline var(--interactive-accent);
80+
--text-decoration-external-link: 0.15em underline var(--interactive-normal);
81+
--text-decoration-broken-link: 0.15rem underline var(--maroon);
82+
--text-decoration-titlebar: 0.15rem underline var(--active-interaction);
83+
84+
/* Padding */
85+
--padding-small: 3px;
86+
--padding-medium: 6px;
87+
--padding-large: 10px;
88+
89+
/* Margin */
90+
--margin-small: 2px;
91+
92+
/* Borders */
93+
--border-default: hsl(249deg 18% 22%) 1px solid;
94+
--border-left-small: 1px solid var(--rosewater);
95+
--border-left: solid 6px var(--active-interaction);
96+
--border-left-hover: solid 6px var(--black-4);
97+
--border-side-misc: 0.15rem solid var(--border);
98+
99+
/* Border radius */
100+
--border-radius-small: 4px;
101+
--border-radius-medium: 8px;
102+
103+
/* Indentation guide */
104+
.markdown-source-view.mod-cm6 .cm-indent::before {
105+
--indentation-guide: var(--black-3);
106+
}
107+
108+
/* Icons */
109+
--icon-height-small: 16px;
110+
--icon-width-small: 16px;
111+
--icon-height-medium: 20px;
112+
--icon-width-medium: 20px;
113+
--icon-background-size: 16px 16px;
114+
--icon-margin-right: 8px;
115+
}
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/* Admonitions */
2+
3+
/* TODO: Remove border-radius from admonitions
4+
being edited */
5+
6+
.markdown-source-view.mod-cm6 .cm-embed-block {
7+
padding: var(--padding-medium);
8+
border-radius: var(--border-radius-medium);
9+
}
10+
11+
.callout-title {
12+
color: var(--rosewater);
13+
}
14+
15+
.callout {
16+
/* uses rgb of catppuccin red */
17+
--callout-color: 242, 141, 171;
18+
19+
.callout-title {
20+
border-top-right-radius: var(--border-radius-medium);
21+
border-bottom-right-radius: var(--border-radius-medium);
22+
}
23+
24+
border-radius: var(--border-radius-medium);
25+
border-bottom: var(--border-default);
26+
}
27+
28+
.markdown-source-view.mod-cm6 .cm-embed-block:hover {
29+
/* TODO: remove or adjust border/move effect on hover */
30+
}
31+
32+
.markdown-source-view.mod-cm6 .edit-block-button {
33+
background-color: var(--internal-buttons);
34+
box-shadow: var(--box-shadow-small);
35+
color: var(--text-on-accent);
36+
border-radius: var(--border-radius-medium);
37+
}
38+
39+
/* Codeblocks */
40+
41+
/* div. from app.css */
42+
43+
.cm-s-obsidian div.HyperMD-codeblock-bg {
44+
border-left: var(--border-side-misc);
45+
border-right: var(--border-side-misc);
46+
padding-left: 2rem;
47+
}
48+
49+
.cm-s-obsidian div.HyperMD-codeblock-begin-bg {
50+
border-top: var(--border-side-misc);
51+
border-top-left-radius: var(--border-radius-medium);
52+
border-top-right-radius: var(--border-radius-medium);
53+
}
54+
55+
.cm-s-obsidian div.HyperMD-codeblock-end-bg {
56+
border-bottom: var(--border-side-misc);
57+
border-bottom-left-radius: var(--border-radius-medium);
58+
border-bottom-right-radius: var(--border-radius-medium);
59+
}
60+
61+
.cm-s-obsidian .HyperMD-codeblock-begin,
62+
.cm-s-obsidian .HyperMD-codeblock-end {
63+
color: var(--text-accent);
64+
}
65+
66+
.markdown-preview-view pre {
67+
border-radius: var(--border-radius-medium);
68+
padding-left: 25px;
69+
}

scss/base/_codeblocks.scss

-29
This file was deleted.

0 commit comments

Comments
 (0)