@alltagsverstand, your suggestion worked beautifully:
=====
" As to your other question regarding styling:
You can adjust the appearance of every single element by using custom css. I guess by “highlighting” you mean selecting text with the cursor?
If so, create an empty text file with the following content:
.theme-dark {
–text-selection: green;
}
Adjust the color according to your needs.
Save your file as select.css under path_to_your_vault/.obsidian/snippets
, then go to your obsidian settings → appearance → css snippets and activate the snippet. This should do it.
For an introduction in customizing obsidian with css, have a look here for example."
=====
I put that code in, and it was working beautifully. Then I wanted to have URL link locations pop up if I hovered over a URL link, so as to see where it would take me were I to click on the link, so I put this code from Matthias into the select.css file:
=====
/*
show-links.css snippet
by @narand, modified by @conbas2019, again by @Moonbase59
see https://forum.obsidian.md/t/external-link-hover-view-url/2876/10?u=moonbase59
2021-05-26 Matthias C. Hormann (Moonbase59)
Made it more robust, for those who use crazy link styles. ;-)
Added cutoff long links with an ellipsis.
Added wrap/no-wrap option, see end of file. Best of both worlds! ;-)
TODO:
- With presentations, shows shifted towards the middle.
- In Obsidian Leaflet popups, appears in the popup.
*/
a.external-link {
position: relative;
}
a.external-link:before {
position: fixed;
left: 0;
bottom: 0;
padding: 0 0.5em;
color: var(–text-normal);
background-color: var(–background-primary-alt);
border: 1px solid var(–background-modifier-border);
border-radius: 0 0.4em 0 0;
font-family: var(–default-font);
font-size: initial;
font-style: initial;
font-weight: initial;
text-decoration: initial;
display: none;
z-index: 1000;
content: attr(href);
}
a.external-link:hover:before {
display: block;
max-width: 98%;
overflow: hidden;
text-overflow: ellipsis;
/* Use one of these for multi-line */
/word-wrap: break-word;/
word-wrap: break-all;
/* Enable this for one line only /
/ white-space: nowrap;
}
.theme-dark {
–text-selection: green;
}
=====
This code works great, now I see URL links on mouse-over.
Problem is, I’ve just discovered that your snippet no longer works.
I’ve tried placing your snippet both at the end of the file (such as the example above, and I’ve also tried placing it at the top, just below the upper comments.
No bueno, something is over-riding/killing the code you suggested, that was working so well.
Any ideas as to how I could fix it… or anyone else have any idea?
Thanks.