Customizing admonitions

I am trying to customise the font size in admonitions by adding these lines to css but somehow it doesn’t work. Any tips or working examples would be greatly appreciated.
.admonition { font-size: 12px; }

Try CSS class .admonitionblock

Thank you @mentaloid .
After resisting for months, I am now trying Logseq DB and struggling to find way to add Admontions. In Logseq MD, it’s conveniently accessible by just simply type < and I can get a list of all admonitions.

However, it’s not the same with Logseq DB.

Appreciate any help from the Logseq community.

I am using Chrome on Mac.

In Logseq DB there is a single menu by pressing / (e.g. /quote). Of course it has differences from Logseq MD and is under construction.

1 Like

For anyone wondering, admonitions work by placing some text inside these pairs:

#+BEGIN_CAUTION
#+END_CAUTION

#+BEGIN_CENTER
#+END_CENTER

#+BEGIN_EXAMPLE
#+END_EXAMPLE

#+BEGIN_IMPORTANT
#+END_IMPORTANT

#+BEGIN_NOTE
#+END_NOTE

#+BEGIN_PINNED
#+END_PINNED

#+BEGIN_TIP
#+END_TIP

#+BEGIN_VERSE
#+END_VERSE

#+BEGIN_WARNING
#+END_WARNING
3 Likes

Again, thank you @mentaloid

I tried / and went through all the commands but admonitions are not found in the list.

Tried /cau and hoped for caution but only Calculator pops up.

Here are the screenshots.

By the way, I tried both .admonition and .admonitionblock, none of them works. I set font size to a crazy value of 50px, just to see if it makes any difference.

Admonitions are not available through slash commands and tag at the moment except for Quote.

You can render the remaining admonitions using the same syntax as in MD - Customizing admonitions - #6 by mentaloid

I have created a template for each admonition and use /template then type the name of the template. I can share the EDN of this setup needed.

1 Like

Thank you @danzu
Coincidently, I was trying to create templates for this exactly reason but somehow I couldn’t. I did raise a question here: Templates - how to create, edit, and insert? - #32 by Camel_0ld