after spending some time in obsidian for writing I’m spoiled by its many beautiful themes and amazing .md rendering… I know Devonthink has a custom css options but couldn’t really find any examples or css repository/gallery who are built to Devonthink.
The css from obsidian don’t really work in Devonthink so Im wondering if anyone cares to share his custom css?
well if I take any css file from an obsidian theme and point the Devonthink option there it docent seem to affect the color, fonts, size etc of the Devonthink .md preview
ie in the image below. both are using the same css file but Devonthink docent get any nice colors fonts etc
Unfortunately, the left part is so small that I can’t recognize anything.
Can you please describe where the stylesheet is located
If the document you’re seeing in DT is imported or indexed from the Obsidian vault
If you export this document in DT “as HTML” and look at the HTML source code, is the CSS included there? Can you please post the head element of this HTML here (preferably as code, i.e.)
```
<head> …
<body>
```
DT has absolutely no problem using external or internal styles. However, if you specify an external one, it overrides DT’s default styles, which might lead to unexpected results. But in your use case, you’ll probably want that.
If you export this document in DT “as HTML” and look at the HTML source code, is the CSS included there? Can you please post the head element of this HTML here (preferably as code, i.e.)
When you open that HTML document in a browser, does it look ok? If not, does the browser console show any errors?
Did you restart DT in the meantime? (style sheets are cached)
Hm. I’m using inline styles (like <link ...> inside the MD document just fine). I’m also using an external style sheet that sits inside one of my DT databases just fine (via a x-devonthinbk-item link). So that is definitely not a principal problem with DT.
Can you send me the HTML and the CSS via PM, please?
That was easy (and I just saw another reason to avoid Obsidian like the plague).
Have a look at their stylesheet: You’ll not see a single mention of h1 (or other HTML elements without classes). They wrote it expressly so that it will not work with a standard MD file. In fact, just looking at it made me barf:
SERIOUSLY? That’s not even going to work in a non-Webkit browser. Who dares to write something like that in 2022? I’m not against styling MD/HTML, not at all. But what these people do is
needlessly complicating their sheets by not using simple HTML elements but something like h1.embedded-note-title instead of h1.
stuff their CSS with tons and tons of icon thingies (background images, whatnot). To make matters worse, they even put data URIs in there for a background image.
try to style input elements that do not exist in MD and should not be styled to keep them easily recognizable (I know that many “web designers” ignore this advice nowadays)
instead of using a media query for dark mode, they splatter the settings for dark and light theme all over the place
and to top it all, this piece of (insert expletive of your choice) is 370 KB.
SERIOUSLY? To style some markdown, while the rest of the world is talking about keeping it small and simple by pruning and minimizing their CSS.
Now that I’ve got that off my chest: Sorry, you cant style normal, standards compliant MD in DT (nor in any other MD app) with this piece of crap.
Some while ago, a user posted their CSS styles here, and many people liked that.
Alternatively, I’d suggest to dig around the Drafts community – afaik, they can and do style their markdown.
Finally, you could just write your own CSS.
But keep in mind (as I said before): Whatever CSS you set in your global DT preferences will completely obliterate DT’s default styles.
The good old American Typewriter. There’s a newspaper here that used it for it’s name tag for a long time … I’m more of a Century Schoolbook and Palatino person, though.
As to
The syling is internal … but can be put into an external stylesheet…
beware of setting that as a global preference, if you only want to selectively replace DT’s default styles.
When I started I just googled “markdown css stylesheet” and saw thousands of options. Then I was overwhelmed and just used one that was shared on here (this one).
Since then I’ve tweaked a few bits, but mostly kept the same settings. This design is easy on the eyes and I know if I start playing to make my “dream stylesheet” in 2 years I will still be changing things
Indeed! As an artist who works in tech, it’s part of what draws me to Markdown: the ability to custom code and easily modify the look of things on a global scale.