Canvas: Rule-Based Node Styling

Use case

I currently style canvas nodes using the built-in color picker using a strict scheme – notes with tag type/lecture are always red, notes with tag type/example are always green, ect. It would be wonderful if these rules could be applied automatically based on note or YAML content.

What I’ve tried

I’ve successfully set some styles using CSS snippets like this:

.canvas-node:has(.tag[href="#type/banner"]) p { font-size: 44px; }

The problem is, I don’t have the CSS skills to match the styling that is achieved when using the built-in color picker, nor do I have the skills or time to develop a plugin on my own. Any suggestions or workarounds would be very appreciated.

1 Like