AP2023
January 26, 2024, 3:47pm
1
What I’m trying to do
I created a css in my .obsidian\snippets folder, only I can’t find a guide to obsidian css.
How should I make it so that the titles of the notes in a certain folder (and its subfolders) are in comic sans blue?
Things I have tried
.folder-name .markdown-title {
color: blue !important;
}
and
[data-path^="X/"] h1, [data-path^="X/"] h2, [data-path^="X/"] h3, [data-path^="X/"] h4, [data-path^="X/"] h5, [data-path^="X/"] h6 {
color: blue;
font-family: "Comic Sans MS", cursive, sans-serif;
font-size: 50px;
}
Here’s a great topic to have a look at:
Obsidian CSS Quick Guide
Hi friends! CSS in Obsidian can be confusing to get into, so this is a guide to get you started with information on the tools, methods, and some background knowledge!
Let’s get started by looking at how you can look behind the curtain of Obsidian’s visuals.
The Developer Console
Obsidian is technically like a website. As such, you can view the source like any other browser.
While you are inside the Obsidian window, you can press ctrl+shift+i to bring up the develope…
AP2023
January 27, 2024, 8:57am
3
thank you, but your guide allows you to change the menu, not the note formatting
It’s just a general guide for Obsidian and CSS.
Can you share a screenshot of where you’d like to change? It may help folks give you some suggestions. CSS alone, or maybe a combination of CSS and GitHub - nathonius/obsidian-auto-class: Automatically add CSS classes to notes based on file path. could do it.
AP2023
January 27, 2024, 10:30am
5
In this example I intend to change the style of titles for notes contained in Guides, but not title of notes in other folders
ariehen
January 27, 2024, 10:38am
6
Got it. Are those ## h2
headings?
So, GitHub - nathonius/obsidian-auto-class: Automatically add CSS classes to notes based on file path. seems like it could work for this.
The example CSS:
.h2-comic {
--h2-font: 'ComicSansMS';
--h2-color: blue;
}
And the settings in auto-class :
1 Like
AP2023
January 28, 2024, 1:49pm
8
Thank you, that was what I was looking for, although complicated to the extreme!
Well, is there an editor for graphical css generation?
Not that I know of.
There are some community plugins, for example, to help in making custom tag colors or custom callouts. Those could be useful.
system
Closed
April 28, 2024, 3:12am
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.