Custom CSS class for internal links

Hi guys,

as you all know, in front-matter we can declare a custom css class (or multiple) to a note. I’ve no idea, who came up with that. But if this person is reading this: Thank you! :smiley: You are awesome!

I’ve had that idea as well. But then I thought, it might be way to special to propose this. But here we are, and I love it.

Among other things I’m using Obsidian for technical documentation. At this I’m using the custom css classes to modify classes to be more suitable for particular requirements. A.e. I’m using three different designs for unordered lists, depending on the topic.

In my theme I’ve added a bunch of svg icons, which can be added with a small html snippet. They’re almost exclusively used to add an icon or symbol to an internal link. Simply to make it easier to spot the link you might be looking for. My personal goal is, to access any information within 3 clicks (and the help of the hover preview). That works pretty well so far.

In this context, what I’d really love to have, would be the possibility to add a custom css class (or multiple) to an internal link. That would be declared in the front-matter of a note. So if you link to that note, these classes would be added to the link.

Right now, at internal links, we can differentiate between notes that already exist, and notes which do not (“resolved”, “unresolved”).

With my idea on top, we could differentiate even more. Like a.e. formatting a link differently if it’s referring to a map of content.

It might even be helpful with the other idea in here: “Add support for link types” (Add support for link types).

I don’t really like the word “request”. It’s more like a wish. But anyways, what do you think?

Cheers,
John

2 Likes

Hi, have you tried the Supercharged Links plugin? If I understand what you’re trying to do correctly, that plugin does exactly just that.
Hope it helps c:

1 Like