> [!sidebar] This is a sidebar.
> This summarizes or supplements the main text.
This is main content of the paragraph and contains the primary text...
The CSS looks like this:
.callout {
border-radius: 10px;
border-width: 2px;
}
.callout-title {
border-radius: 10px 10px 0px 0px;
}
.callout p {
margin-block-start: 0em;
margin-block-end: 0.5em;
}
.callout[data-callout="sidebar"] {
/* TODO: I'd like the callout color to
* match the vault's accent color.
* But I don't know how to convert
* var(--color-accent) to r, g, b.
* For now we'll use a sort of
* yellow sticky-note color. */
--callout-color: 189, 142, 55;
--callout-icon: lucide-info;
max-width: 40%;
float: right;
margin: 12px;
}
You might be able to build on this to build a more dialogue-like layout, perhaps with a [!pro] on one side of the page, and a [!con] on the other?
THANK YOU for sharing, @Craig. I will definitely use this.
I fear, however, that my mind is not suited to creating things like CSS. It quickly fogs over when I try things working along the lines of programming. I tried many times …
Do you think there is any way to put two or more of these side by side?
Actually, two side by side is already ossible by putting a normal callout into the text.
What is not possible in this fashion: orderly table-like structures with equal lengths that allow for controlled side-by-side presentation of arguments.
The only way I can think of that would allow this is a table-like structure…
@Craig this is exactly what I was looking for. I can’t seem to get the sidebar alongside the main text like you show in your screenshot; it creates an empty block. I’m sure it’s something simple but can you point me in the right direction please?
Sure!
The CSS was what you provided in November.
Here’s the source code:
[!sidebar] The assistant.
It doesn’t matter what his name is.
You didn’t know much about the man who hired you, and nothing about his impossibly skinny
assistant. Ortho had at least sufficient money and connections to procure a small treasure and a
For easier use of something like @Craig’s snippet, that does a specific thing that you would like to apply to any of your styled callouts, you should use something like this:
Thanks for the nifty snippet and metadata tip! I’m using the Minimal theme and get this, which… I kinda like? Going to try using it as a pseudo Cornell Notes cue/note setup.
Right? This just makes it so much easier to use callouts in multiple ways. The CSS is not mine, I first saw this on another forum post by @Fuyuu. All credit goes to him/her!
Here it is:
This is all wonderful stuff. Thanks to @Craig, @Olondre and @Fuyuu for their smarts and generosity. Have set up a left and right sidebar option that works a treat with all
standard callouts in Minimal – very sweet. Last wish: If only this worked in LivePreview.
Just found another little query: how can I combine the metadata instructions “| sidebar” with “| noicon”? I’d really love both: a sidebar callout without an icon that seems unecessary in the sidebar but combining them seems to cancel the second instruction out.
Thanks