Developer-Mike / obsidian-advanced-canvas

⚡ Supercharge your Obsidian.md canvas experience! Create presentations, flowcharts and more!
GNU General Public License v3.0
286 stars 12 forks source link

[BUG] cssclasses don't work #79

Closed CatCodeMe closed 3 months ago

CatCodeMe commented 3 months ago

Hello Mike, this is my problem.

env

issue

I have added a css-snippet , it works when I add cssclasses:banner , like this

image

rendered like this

image

Now, I want to use plugin's cssclasses to reach this goal, but it don't work, don't have any changes.

so, is it a bug ? And If I want to add multiple cssclasses, use banner, banner-fade ?

Developer-Mike commented 3 months ago

This issue is caused by the snippet which isn't made for canvas. Advanced Canvas adds the class to the canvas-wrapper element rather than to each node. To make your CSS snippet compatible, you need to add a space before every .markdown-preview-view. If you adjust this, any children (in this case the nodes) also get affected by the style.

If you want to add multiple classes you can separate them using spaces.