kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
2.06k stars 161 forks source link

Please provide examples and explanations for creating custom models #126

Closed HendrikHuebner closed 11 months ago

HendrikHuebner commented 1 year 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 11 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 8 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.