CSS Style Sheet Help

I am trying to develop a CSS style sheet for DevonThink 3. My goal is for there to be as much stylistic homogeneity between Markdown documents in DevonThink 3 and Obsidian. Opening a Markdown file in either should be, more or less, the same aesthetic experience, at least as far as structure and typesetting are concerned.

I am at a loss at how to write CSS code to target specific elements that I would like to modify. For example, I would like to modify how documents are transcluded in DEVONThink. In Obsidian, transcluded notes are indented within the master note. And these transcluded notes, in turn, may have notes transcluded within them, and so on. The result is a tree-like structure in which child notes are spatially indented from their parent notes, in which they are transcluded. This behavior is very nice for archiving forum threads and capturing their comment/reply structure.

I have tried opening the dev tools within Obsidian to see if I could use snippets from their style sheet, but to no avail. Anyway, some help would be greatly appreciated.

Just to clarify: you’re not going to “modify how documents are transcluded in DEVONthink”. You may be able to style something… or not (I’m away from my Mac right now), but that will not change the transclusion mechanism.


There is nothing to style in this case. A transclusion uses the content of the transcluded document as-is. As you can see in this example conversion of Markdown to HTML, the second p elements are two transcluded files…

image

This means there is no child/sibling relationship between transcluded content and the main document with the transclusion link.

And these transcluded notes, in turn, may have notes transcluded within them, and so on.

DEVONthink can have such nested transclusions as well.

Opening a Markdown file in either should be, more or less, the same aesthetic experience, at least as far as structure and typesetting are concerned.

While I understand your desire here, this is not something you should expect between two different applications, developed independently, using different Markdown flavors (with Obsidian using their own proprietary syntax).

Any changes in the displayed would have to be assessed as to feasibility and the broadness of appeal of the change. I have seen no other such requests at this point.

Markdown is not PDF. By default, there is no information contained in a .md document that instructs an application how exactly it should be rendered. You can try and make it the “same aesthetic experience” by tweaking the CSS, but there is no guarantee that you can get exactly the same experience without an excessive amount of work.

2 Likes

CSS ist not about opening a Markdown fille. It’s about styling the HTML generated from MD by a previewer/transformer.

If different previewers generate the same HTML DOM and you use the same CSS, the HTML should look identical.

Mostly, the previewers do generate the same or similar HTML DOM. But there’s no guarantee for that. Much less with more exotic (read: depending on the MD dialect) features like transclusion.

What Obsidian does in this case, might look nice to you. It might look weird to others: if I use incision to assemble parts of a larger document, why should the parts be indented? When are paragraphs in a documented ever indented like in a tree view?

Frankly, I find obsidian’s behavior irritating (if it can’t be turned off). If I want a paragraph indented, I’d use a quote or perhaps a definition list (for example). But I wouldn’t want an MD processor second-guessing my intentions when I transclude files.

1 Like