obsidian13-canvas-smooth-cards
CSS snippet for @obsidianmd app. To synchronizes reading and editing modes for text card in canvas
Smooth text cards for canvases
Obsidian CSS snippet for smooth text cards in canvases. It visually synchronizes cards reading and editing views.
The Solution:
No view jumpings for long texts:
Usage
Just add this code to appropriate place:
<span class=vertical-space> </span>
See examples in assets/test.canvas file (you need to copy it to your obsidian's vault first).
Snippets
- Main snippet:
canvas-smooth-cards.css - Additional snippet for callout support:
canvas-smooth-cards_addition.css. It is currently in draft status as of 2026-03- Note: it changes the appearance of callout blocks even outside of canvases. If you don't like this behaviour — turn it off.
Installation (auto)
Note: this is recommended way, but you need to install two additional plugins
- Install BRAT plugin by TfTHacker from Marketplace
- In Obsidian: Via BRAT plugin's settings install Snippet Downloader plugin
-
It is no longer supported and removed from Marketplace, but still works (mart 2026)
-
But with one visual bug:
-
- In Obsidian: Add this repository to the Snippet Downloader in it's settings
- In Obsidian: Go to Settings → Appearance → CSS Snippets
- In Obsidian: Press "Reload snippets" button (with arrows icon)
- In Obsidian: Turn on the appropriate snippets in the list
Installation (manual)
Note: for every repository update you need to manually re-install snippets
- Download all
.cssfiles fromsrcfolder of this repo - Open Obsidian app
- In Obsidian: Go to Settings → Appearance → CSS Snippets
- In Obsidian: Press "Open snippets folder" button (with folder icon)
- Move downloaded files to that folder
- In Obsidian: Press "Reload snippets" button (with arrows icon)
- In Obsidian: Turn on the appropriate snippets in the list
Configure
You can create automatic text trigger (e.g. :vs) via espanso app. Use this config:
matches:
- label: "Vertical space for Obsidian's canvas"
trigger: ":vs"
replace: "\n\n<span class=\"vertical-space\"> </span>"
You can create keyboard shortcut trigger (only CTRL+… supported) via espanso app. Use this config:
matches:
- label: "Vertical space for Obsidian's canvas"
trigger: "\x13" # ctrl-s
replace: "\n\n<span class=\"vertical-space\"> </span>"
force_mode: keys
Configure for MacOS
You can create ⌥⏎ (option + enter) keyboard shortcut via Karabiner Elements app. It's much more common to make vertical spaces using the Enter key.
For single english-only keyboard layout:
- In Karabiner Elements: Open Settings → Complex Modifications → Add your own rule
- Add contents of
config/karabiner-elements/single-layout.jsonfile to model window and press the save button. - That's all. Note: new keyboard shortcut is working only in Obsidian app.
For multiple keyboard layouts:
- Install the util to change current keyboard layout to english:
xkbswitch-macosx - Open terminal and switch keyboard layout to English
- Run this command to find keyboard layout id:
xkbswitch -g. Remember the number - In Karabiner Elements: Open Settings → Complex Modifications → Add your own rule
- Add contents of
config/karabiner-elements/multiple-layouts.jsonfile to model window - Find this text:
/usr/local/bin/xkbswitch -s 1and change number1to your keyboard id - Press the save button
- That's all. Note: new keyboard shortcut is working only in Obsidian app.
Changelog
- v1 (2025-10-17) - vertical space for h1, h2, h2, p, table, ol, ul and sync ol, ul
- v2 (2026-03-10) - fixed layout for headers and tables; added draft support for callouts
How to Install
- Download the repository ZIP below
- Unzip it and find the CSS snippet file
- Move the CSS file into your vault's
.obsidian/snippets/folder - Open Obsidian → Settings → Appearance → CSS Snippets → Enable it
Stats
Stars
3
Forks
0
License
MIT
Last updated 5mo ago