Home / GitHub Page

Question or Feature Request? : CSS tricks


#21

What’s supported is in the doc. Other things might work but have not been tested and may or may not be officially supported later on.


#22

The only information I can find in the docs is:

Rendered markdown can be customized by placing a userstyle file in the profile directory ~/.config/joplin-desktop/userstyle.css […] This file supports standard CSS syntax.

I haven’t been able to find anything about CSS classes and styles that can be applied to the rendering process. Maybe I am missing an important link?


#23

I haven’t been able to find anything about CSS classes and styles that can be applied to the rendering process. Maybe I am missing an important link?

Joplin doesn’t expose any CSS class. The CSS user style is only to style your own classes (when you use HTML) or to target certain basic elements. For example strong { background-color: yellow } to highlight bold elements in yellow.

There’s only minimal support for this because specifying every single HTML element or class that Joplin might generate would not be useful since they might change from one version to another.


#24

Okay, fair enough.

I’d suggest to postpone this to some future milestone.


#25

Apparently they do, since this works:

body {
    color: red;
}

@media print {
    body {
        color: blue;
    }
}

Joplin displays red, PDF has blue.


#26

It seems nobody mentioned it yet, so I’ll just add that HTML already has a tag for highlighting, <mark>.

So <mark>like this</mark> for the text you wish to highlight. (I wish we had an extension for this, adding tags by hand is inelegant and annoying.)