Allow @import within Obsidian.css

I’m already using (and testing) different community themes. However, there is a set of custom CSS that I want to always have no matter the theme. Instead of having to paste the whole block of code each time into the obsidian.css, I would like to paste the @import 'custom.css' line to the top of the obsidian.css file.

11 Likes

I’ll second this. If using the @import statement is a no-go for some reason, Obsidian could instead merge CSS from a static user CSS file.

1 Like

+1 for this. Weird.

1 Like

Not just weird. It’s a major headache. In my case, for example, it would sure be nice to put 1.1 MB of Base64 Encoded fonts somewhere other than my main theme CSS.

I’m guessing this has to do with portability. Before V1.0 themes were contained in a single CSS file that was intended to be shared among users. But now a theme comes in a directory that holds both theme.css and manifest.json. A change like that seems a nod in the direction of allowing a broader concept of theme. It certainly means that a theme should allow for multiple CSS files and use of @import.