kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
1.99k stars 150 forks source link

Please provide examples and explanations for creating custom models #126

Closed HendrikHuebner closed 10 months ago

HendrikHuebner commented 10 months ago

I would like to learn more about how I can apply custom styling to my cards with html and css. The documentation is very short.

kerrickstaley commented 10 months ago

Anki's docs have lots of information about how to use HTML and CSS to style cards: https://docs.ankiweb.net/templates/styling.html

raine commented 6 months ago

Anki's docs have lots of information about how to use HTML and CSS to style cards: https://docs.ankiweb.net/templates/styling.html

There is no documentation on how to add styles with genanki specifically. Which is a fair point.

To anyone else wondering, you need to use the css parameter in Model's constructor.