@BLUEFROG good point! I take it from your comment that it should be possible to show different styles in light mode and dark mode within DT via CSS, then?
Here’s a sample of what isn’t working for me. It’s pared down from my normal CSS file, but it still seems to fail in the same way:
I would not use the :root element. Other than specificity, it’s the same as the HTML element.
You ready for this?
PS: Due to the potential style caching issue, I suggest using internal styling in the Markdown until you achieve the desired look. After that you can move it to an external stylesheet if you want, but iterations are much faster with internal CSS.
Ah, okay. I got the :root concept from a tutorial on setting this up on the web. Thought it’s as good a place as any to start on a DT css file.
Ready for wha?
I guess I’m just looking for an example css selector that picks up on dark mode in DT. I just need to know how to detect it, then I can go from there. If such a thing is possible!
@media (prefers-color-scheme: dark) {
html {
variable-name: variable-value;
}
}
Works like a charm.
PS: your PS
PS: Due to the potential style caching issue, I suggest using internal styling in the Markdown until you achieve the desired look. After that you can move it to an external stylesheet if you want, but iterations are much faster with internal CSS.
is a great tip. woof. So many times I could have avoided quitting the app and restarting it!
Sure, it’s possible but I would really suggest grabbing the screencap (which you can easily click to show then drag onto your desktop) and typing it out in a new Markdown document.
Just like with scripting, blindly using someone else’s code or copy and paste is a poor way to learn. Typing, screwing up, correcting, screwing up again, correcting again, and finally feeling the accomplishment of getting the code in your hands will benefit you more in the long run.
And trust me, I have years of typing and screwing up. Gotta start somewhere
IMHO, this is highly confusing.
If there is no format “note” in devonthink this wording shall not be used in the preferences of the app. Instead, the app preferences shall name the file formats supported, i.e. RTF, Formatted Notes, MD.
This would make it crystal clear to the user what to expect (w/o searching in the guide).
A very important note for anyone trying this out as I did: CSS in markdown documents can not have any extra whitespace - as in, extra blank lines between style elements. This took me forever to figure out so I hope it helps you!
It might be worth adding adding a note to this effect in the help section on Markdown styling as it’s not immediately obvious. Most coding practices and sample CSS stylesheets include extra line breaks.