Which CSS snippets can be used to beautify our notes?

This post was last updated for 532 days ago, and the information may already be changed

I know "content is always the most important," but it is also natural for notes to be more visually appealing. Protyle has a CSS snippet feature that can easily give notes with specific attributes a special appearance, like this:

div.protyle-wysiwyg.protyle-wysiwyg--attr > div[custom-background='1']{
    background-image:linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%)
}

This code snippet will add a background gradient to the note content.

just like this:

image.png

Simply set the attribute custom-background='1' for a block, and you can use CSS selectors to add some decorations to it.

However, not all CSS properties can be easily set in this way. where and how can we find more CSS snippets can be used in siyuan to beautify our notes?

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • StarDustSheep

      Fow now, many people rely on the block styles provided by the themes' CSS properties. However, this way causes styles to be lost when switching themes. Luckly, a new plugin has recnetly been released in the marketplace, it allow you add CSS properties in block menu.

      image.png

      image.png

      image.png

      However, it's important to note, that by adding styles using this method, your styles may only be compatible with light color themes.

      image.png

      And, this plugin can't set CSS properties for many blocks in same time for now.

      image.png