aidenlx / obsidian-icon-shortcodes

Obsidian Plugin: Insert emoji and custom icons with shortcodes
MIT License
143 stars 11 forks source link

Adapt icons to theme / text color #31

Closed NomarCub closed 2 years ago

NomarCub commented 2 years ago

By default most icons are in black (with Obsidian and Lucide icons that are the only ones available from the start both being this way), making them basically invisible in dark mode, which is Obsidian's default. image

I know there are workarounds to this (like mentioned in #12). But proper support for this would mean no tinkering needed from end users.

Icons could also take the color of link titles and whatever else text context they're in via currentColor, color or other properties. Here the plus sign could be purple too, making it look more like it's part of the link's text. image

I know Lucide supports currentColor already and other providers probably also do, and there are ways to do it regardless. Here's a pointer to some other info about currentColor in Obsidian.

aidenlx commented 2 years ago

related to #23

I-Pch commented 2 years ago

I just want to add a big +1 to @NomarCub request 👍 😇

aidenlx commented 2 years ago

will be released in next version (when this commit is merged to master branch)

NomarCub commented 2 years ago

The new release just dropped with this, thanks!

There are two edge cases I found right off the bat. Icons at the beginning and end of links get colored as normal text, not as the link color. image

And the picker doesn't adapt at all. image

aidenlx commented 2 years ago

@NomarCub for links, it seems to be a problem of code mirror so there isn't too much I can help, it works as expected in reading mode btw. for suggester, I've pushed v0.9.2 to fix this