aidenlx / obsidian-icon-shortcodes

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

css variable to specific icon's url #30

Open NomarCub opened 2 years ago

NomarCub commented 2 years ago

It'd be cool if I could use the plugin's icons in snippet CSS files in place of regular encoded SVGs. The background-image property is the one I encountered most. It's handy for note icons, favicons, etc. (I know you make the folder note plugin too, so if you have some other insight (that would make this issue obsolete) into having note icons in file explorer and the sidebar I'd greatly appreciate that as well.)

aidenlx commented 2 years ago

it should be doable, meanwhile alx-folder-note already support folder icon, you can try new set folder icon option in alx-folder-note v0.15.0 in the context menu of folder and folder note in v0.15.0 (of course, you need to make sure folder icon is enabled in the setting tab)

NomarCub commented 2 years ago

I previously thought this undoable, but you can use local custom SVGs via absolute paths like this: app://local/C:/Users/....svg. This only works for custom icons, not ones built into the app or the plugin, and you have to deal with absolute paths which are not portable.