admonitions
admonitions copied to clipboard
Odd request for help for custom admonitions
There are probably some very good reasons not to do this, but I would like to create a custom admonition that will put the admonition block next to the next div.
The use case is to provide the ability to have "callouts" that are specific to that paragraph, next to that paragraph.
What I have so far:
-
created a custom admonition called "aside".
-
turned on "use CSS Snippet for custom callouts" in Admonitions settings.
-
Adjusted the CSS in the generated custom snippet. (See below.)
.callout[data-callout="aside"] { --callout-icon: add-note-glyph; align-self: end;}.
admonition-aside-parent {position: relative; top: 200px; left: 670px; display: flex; flex-flow: row; height: 150px;}
In case it's not obvious: that works for my display only. Don't think it works on mobile at all.
Hoping to find, eventually, a way to "calc()" the next div's position to make the call out relative to the next div, as opposed to being hard coded... But this works well enough for me.