Editing Anki CSS/html

I don’t think there’s a reason why it couldn’t have it, but there’s always that maintenance burden. When implementing a solution, it would always be nice if it can cover all cases. Like having a global HTML header would be nice, but how about a global HTML footer as well? What if a user wants to make small changes for specific templates? We’d quickly be back at the start, just with more complexity added.

My dream solution would be to be able to define a set of components using a library like Svelte, and have templates just include the externally defined components as it needs. Svelte would be perfectly suited for Anki templates, because it wouldn’t incur any overhead while viewing the cards, because it compiles down to Vanilla-HTML+CSS+JS. And in fact, Svelte is already used by Anki internally. Anki could then store the components defined in Svelte, but also store the compiled output.

So while this solution sounds nice in my head - and in fact my Asset Manager is a little bit modelled after this idea - how it would turn out in practice is a different question. Also it would cause major disturbance in the Anki world, so it would have to be really worth the hassle.

1 Like