Hello everyone. Day by day I am customizing Joplin so that he can respond to my needs. One of the changes made to the application, thanks to the userstyle.css file, is to use blockquotes to create callouts. The following code is part of the change made.
What I would like is to make this callout "smart", I'm going to explain in detail: based on some conditions I would like to change both the icon and the background color in a "smart" way. Can you think of any ideas to make it happen? I hope I was clear. Thanks in advance to anyone who wants to help me.
@dpoulton Thank you very much for the answer, that's exactly what I meant, but I would like to get the same result with my own code, both to be able to maintain and customize it independently.
I'm not sure you will be able to get "smart" features without using the plugin (or a similar plugin you write yourself) as it adds css classes for each different callout type. At the moment you are limited to blockquote which you can only modify the once.
However in a reply to GitHub issue #4 for the plugin (see GitHub link above) the plugin author does say:
I just tried overriding a color via userstyle.css and it seems to work well. You can use markdownit-admonition.css as a reference.
The css file also contains the callout icons. The author does not specifically state it but maybe the icons could also be customised using userstyle.css?
Thanks @dpoulton, in the end I tried to create a solution myself using HTML tags and for the CSS the :has() selector, but using only these tools is limiting.
So I followed your advice, installed the Admonition markdown extension and customized the callouts inside the userstyle.css file.