TfTHacker / obsidian42-strange-new-worlds

Revealing the strange new world of connected thoughts in your vault.
https://tfthacker.com/SNW
MIT License
443 stars 14 forks source link

Feature request: Make keywords more visible in results pane #50

Closed ryadaj closed 1 year ago

ryadaj commented 1 year ago

I tried this on default theme and it is slightly better, but if the linked word/phrase in the results pane could be given more contrast than present, either via darker bolding or a highlight, that could be helpful.

Not sure if possible, but just wanted to put it out there 🫠

Screenshot 2022-11-18 at 08 18 17
TfTHacker commented 1 year ago

Thank you for reaching out with this idea. SNW in the file preview is using default styling for the pane from search. What this means is its using the themes default as defined for search results. So you can tweek these settings with CSS.

ryadaj commented 1 year ago

Oh that's good to know! I'm not very technical so I'll have to ask around for some help with that :)

theowoo commented 1 year ago

Thank you for reaching out with this idea. SNW in the file preview is using default styling for the pane from search. What this means is its using the themes default as defined for search results. So you can tweek these settings with CSS.

@TfTHacker Thanks for creating this plugin. I don't think the current version respects the default styling from search. Demo:

snw_links

  1. Built-in search: highlight
  2. Built-in backlinks ("toggle backlinks in document"): highlight
  3. SNW panel: normal

I have been able to tweak the behaviour somewhat using the following CSS snippet, but it would highlight all links in the search context, not just the relevant link.

.snw-ref-item-info a {
    text-decoration: underline; 
    /* color: var(--link-color) !important; */
    background-color: var(--text-highlight-bg);
}

Is there a way to selectively restyle links to the node under inspection? Thank you.