Thanks for your sharing and I find it better for me to be like this:
/* highlight (==) not visible anymore if not active line */
div:not(.CodeMirror-activeline) > .CodeMirror-line .cm-formatting-highlight.cm-highlight {
font-size: 1em;
color: transparent;
}
It removes the distraction of “==” and avoids the alignment problem.
This is a css hack I used in my theme: Obsidianite Theme, A lot of people liked it and added to their themes, so I decided to share it with everyone. Feel free to use it to customise your own theme!
Got something to contribute: Here’s how to target specifically block reference embeds:
.internal-embed[src*="#^"]
For anyone who is interested wtf all those symbols mean — .internal-embed divs have a src attribute which has the link text in it (so if you’re linking to a block ref in a page called note, it would be src="note#^blockref".
The square bracket part is an attribute selector which checks if the src value contains (*=) #^ — which is how you tell it’s a block reference link.
If you wanted to target heading links, you want where the src contains # but not #^, so you’d have to use something like this:
.internal-embed[src*="#"]:not([src*="#^"])
For full page embeds, you want neither # or #^ so
.internal-embed:not([src*="#"]):not([src*="#^"])
As @Klaas pointed out in discord, this also means if you want to target embeds of a specific page, you could do
I also discovered a potential issue with the above: .internal-embed:not([src*="#"]):not([src*="^"]) is considered more specific than .internal-embed[src="Lorum ipsum test"] (because of the two :nots), so with the following code:
It can work in 0.9.12, but isn’t perfect, because the upper border is fixed and the popover may be farther away from the mouse position. And if you have any ideas, please let me know.
Does specifying a color for a certain tag only work in preview, or can it be done for editor mode too?
(Apologies if this was answered, I looked but might’ve missed it.)
thanks…this doesn’t end up helping, though. it includes a lot of stuff that I don’t want (pills) and i can’t parse out what’s useful here. In fact, when I tried pasting it in over the existing code, the effects only showed up in preview mode.