.css files stored in your vault’s configuration folder.
Where snippets live
Obsidian looks for CSS snippets in:.css file in the folder becomes a separate snippet you can toggle on or off independently.
Add a snippet on desktop
Open the snippets folder
Go to Settings → Appearance → CSS snippets and select the Open snippets folder icon.
Create a CSS file
In the folder that opens, create a new file with a
.css extension, for example my-tweaks.css.Reload snippets
Back in Obsidian, under Settings → Appearance → CSS snippets, select the Reload snippets icon to refresh the list.
Add a snippet on mobile
Locate your vault folder
Open your device’s file manager. Find the vault’s location — you can check the path in Manage vaults by tapping your vault.
Create the snippets folder
Open the
.obsidian configuration folder inside your vault. Create a folder called snippets if it doesn’t exist.You can also sync snippets to mobile using Obsidian Sync or any other sync service, or use a community plugin to create snippets from within Obsidian.
Hot-reloading snippets
Once a snippet is enabled, Obsidian automatically detects changes when you save the file and applies them immediately — no restart required. If you don’t see the change, use the Command palette command Reload Obsidian without saving to force a full refresh.CSS variables
Obsidian exposes a large set of CSS variables that make it easy to adjust the interface consistently. Setting a variable onbody applies it globally.
Example snippets
Change the body font
Change the body font
Hide the ribbon
Hide the ribbon
Limit line width for reading
Limit line width for reading
Per-note styling with cssclasses
Per-note styling with cssclasses
Add a custom CSS class to individual notes using the In your CSS snippet:Every note with
cssclasses property, then target that class in a snippet.In the note’s frontmatter:red-border in its cssclasses property will display images with a red border.Validate your CSS
Invalid CSS is silently ignored. If a snippet doesn’t work, run the file through the W3C CSS Validation Service to check for errors.Learn more
- Learn to style HTML using CSS — Mozilla’s beginner CSS guide
- About styling in Obsidian
- Build a theme