Unresolved link does not have "is_unresolved" CSS class
Links being populated by dataview seems to be a tags with internal-link class. If the link is unresolved, the is_unresolved class is missing.
User is unable to differentiate links to files that exists versus unresolved ones when using dataview.
That's interesting; I use Obsidian's own link rendering! Will have to investigate more.
I had the same issue in my plugin. When manually creating an internal link, everything else works besides styling unresolved links as such.
One can check if a link is unresolved using app.metadataCache.unresolvedLinks[currentFile.path][targetFile.basename] > 0, and then add the is-unresolved class as necessary. However, this doesn't actually style the link as unresolved, even with the class.
What I ended up doing was making a custom unresolved class, and just applying a.custom-unresolved { opacity: 0.6 } to simulate the effect
I'll see if I can do the same. A little annoying based on my code structure but manageable.
An easier solution in the end was to give the container a class of '.markdown-preview-view, or '.markdown-preview-section, I forget.
You still have to give each link .is-unresolved as is appropriate, but you don't need to do any custom styling if the container has that class.
This may change the styling of everything else though, so just make sure of that
have this been resolved?
I believe not. From the looks of it, seems like an annoying Obsidian bug.
I don't think this is quite easy to solve. Meanwhile, I've been wanting a boolean attrib for is_resolved inside the link object. Would be a nice QOL thing. Perhaps that could be combined with the rendering to assign the CSS class.