You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog-posts/2025-06-17-making-callouts-obsidian.ipynb
+18-9Lines changed: 18 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -266,14 +266,8 @@
266
266
"\n",
267
267
"\n",
268
268
"\n",
269
-
"Each level keeps its own style, icon, and background overlay, making complex structures more readable."
270
-
]
271
-
},
272
-
{
273
-
"cell_type": "markdown",
274
-
"id": "91993899",
275
-
"metadata": {},
276
-
"source": [
269
+
"Each level keeps its own style, icon, and background overlay, making complex structures more readable.\n",
270
+
"\n",
277
271
"## My Exact CSS File\n",
278
272
"\n",
279
273
"Below is the complete CSS file I use for my custom callouts in Obsidian. The colour variables are defined at the top using the Dracula theme palette, but you can easily swap them out to match your own preferred colour scheme.\n",
@@ -4,11 +4,33 @@ After spending some time experimenting with different ways to style my notes, I
4
4
5
5
Callouts are a powerful way to visually style notes in [Obsidian](https://obsidian.md), especially when organising research, study notes, to-do lists, or even documenting your projects. While Obsidian comes with built-in callout styles like `> [!note]`, you can easily create your own custom callouts with a bit of CSS.
-[Step 4: Using Theme Variables for Consistent Colours](#step-4-using-theme-variables-for-consistent-colours)
20
+
-[Helpful Tips](#helpful-tips)
21
+
-[Foldable Callouts](#foldable-callouts)
22
+
-[Creating a Colour Overlay on a Dark Base](#creating-a-colour-overlay-on-a-dark-base)
23
+
-[Nesting Callouts](#nesting-callouts)
24
+
-[My Exact CSS File](#my-exact-css-file)
25
+
-[Final Tips](#final-tips)
26
+
9
27
---
10
28
11
-
## Step 1: Enable Custom CSS Snippets
29
+
## Steps Overview
30
+
31
+
The following steps will guide you through creating custom callouts in Obsidian:
32
+
33
+
### Step 1: Enable Custom CSS Snippets
12
34
13
35
Before we begin, make sure you’ve enabled CSS snippets in Obsidian:
14
36
@@ -20,7 +42,7 @@ Before we begin, make sure you’ve enabled CSS snippets in Obsidian:
20
42
21
43
---
22
44
23
-
## Step 2: Define a Custom Callout Block in the css file
45
+
###Step 2: Define a Custom Callout Block in the css file
24
46
25
47
Here’s an example of a custom callout called `figure` with a pink theme and a pencil icon:
26
48
@@ -48,7 +70,7 @@ And voilà, Obsidian will render it with your defined styles.
48
70
49
71
---
50
72
51
-
##Customise Labels, Icons & Colors
73
+
### Step 3: Customise Labels, Icons & Colours
52
74
53
75
You can define any name for your callout, it can be `[!theorem]`, `[!tip]`, `[!poetry]`, or whatever suits your workflow. Each one can be styled uniquely by modifying:
54
76
@@ -112,7 +134,63 @@ This will render as:
112
134
113
135
---
114
136
115
-
## Foldable Callouts
137
+
### Step 4: Using Theme Variables for Consistent Colours
138
+
139
+
If you want to keep your callout colours consistent with your Obsidian theme, or you just want an easy way to update your colour scheme in one place, you can define custom colour variables using the `:root` selector at the top of your CSS file.
140
+
141
+
Here’s an example using a Dracula-inspired palette:
142
+
143
+
```css
144
+
:root {
145
+
/* Dracula base palette */
146
+
--drac-bg: #282A37;
147
+
--drac-pink-rgb: 255, 121, 198;
148
+
--drac-cyan-rgb: 132, 222, 240;
149
+
--drac-purple-rgb: 189, 147, 249;
150
+
--drac-green-rgb: 80, 250, 123;
151
+
--drac-yellow-rgb: 241, 250, 140;
152
+
--drac-red-rgb: 255, 85, 85;
153
+
}
154
+
```
155
+
156
+
Then, reference these variables when creating your callouts:
This approach keeps your CSS more readable and maintainable, and allows you to easily **change the colour scheme for all your callouts at once** by editing the `:root` variables.
168
+
169
+
For example, your `theorem` callout could use the purple variable:
You can make callouts foldable by adding `+` or `-` after the label:
118
196
@@ -133,7 +211,7 @@ This works on both built-in and custom callouts.
133
211
134
212
---
135
213
136
-
## Creating a Colour Overlay on a Dark Base
214
+
###Creating a Colour Overlay on a Dark Base
137
215
138
216
If you're using a dark theme and want each callout to sit on a consistent dark base while still showing its colour clearly, you can use an **overlay effect** like this (add it into the same CSS file):
139
217
@@ -169,7 +247,7 @@ This is especially helpful when **nesting** callouts (see below), as it prevents
169
247
170
248
---
171
249
172
-
## Nesting Callouts
250
+
###Nesting Callouts
173
251
174
252
Yes, you **can nest callouts**, and they’ll render beautifully, especially if you use the background layering technique above.
175
253
@@ -185,16 +263,175 @@ This will render as:
185
263
186
264
Each level keeps its own style, icon, and background overlay, making complex structures more readable.
Below is the complete CSS file I use for my custom callouts in Obsidian. The colour variables are defined at the top using the Dracula theme palette, but you can easily swap them out to match your own preferred colour scheme.
269
+
270
+
I use a variety of callouts to visually organise different types of content in my notes. For instance, `figure` and `equation` callouts highlight key diagrams and mathematical expressions, while `theorem` is used to frame formal results. I use `example` to walk through concepts, `todo` to track ongoing tasks, and `tip` or `important` to emphasise helpful insights. For summarising ideas, I use `abstract` and `summary`, and I reserve `bug`, `fail`, and `error` to flag issues or areas needing revision. Each callout is styled with a Dracula-inspired colour overlay to maintain visual consistency across my workspace.
0 commit comments