jdanielmourao / obsidian-sanctum

A minimalist theme for Obsidian.md, with the aim of creating a serene space of retreat, for thought and uninterrupted work.
MIT License
316 stars 22 forks source link

Highlights don't work #202

Open Hirashi3630 opened 2 years ago

Hirashi3630 commented 2 years ago

It has been 2 weeks since I posted this as a discussion and no one answered, so I'm trying this here because I'd love to use this feature!

Discussed in https://github.com/jdanielmourao/obsidian-sanctum/discussions/196

Originally posted by **Hirashi3630** October 6, 2022 Hi, I can't find anyone asking this before, so here I go. In the wiki, it's shown that highlights display as an underline + animated on hover ![working multicolored highlights](https://user-images.githubusercontent.com/91087143/139734042-ea7ed245-9cee-4b18-8466-4a1830bf3f69.gif) mine looks like this (static) ![mine multicolored highlights](https://user-images.githubusercontent.com/37778278/194301866-8c45ab8b-7441-435f-8052-c81a7c02e258.png) Is this something I need to turn on? I've searched in Style Settings plugin and found nothing (I didn't change anything in settings + Contextual Typography is installed too if that matters) Thanks

UPDATE: since the new update all colored highlights are now single color: image

dimib-tech commented 1 year ago

Let me bump this post by posting a comment. Same here.

jenpritchard commented 11 months ago

Same here, a year later :(

jfietz commented 6 months ago

Anoter 6 monts, still an issue

jdanielmourao commented 6 months ago

Hi! Sorry for not getting back to you guys. Life got in the way, and I've been fully away from github for quite a while. This feature has been deprecated a while ago. It's my fault for not updating the documentation in so long, apologies. I did manage to find an old css snippet through discord.

.markdown-rendered mark,
.cm-s-obsidian span.cm-highlight {
    font-weight: normal;
    color: black;
    background-color: transparent;
    background-image: linear-gradient(120deg,yellow,yellow));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 3px;
    transition: background 400ms ease;
}

.markdown-rendered mark:hover,
.cm-s-obsidian span.cm-highlight:hover {
    background-size: 100% 100%;
    color: black; /* change this if you need more contrast */
}

Though this has some of the CSS selectors updated, it will not work in the current version of obsidian. I don't currently have an adequate setup to actively work on the theme, so I can't properly troubleshoot this for the time being. I'd recommend asking for help over on obsidian's discord. I'll try to get back to developing Sanctum asap though. Again, sorry for the (really) long wait and unsatisfactory reply, and thank you for keeping an eye on Sanctum despite my absence. :)

jfietz commented 5 months ago

Do you intend to have a replacement feature for color-coding words / sections of a doc? If so, I'd be willing to take a deeper look in the next week(s)