badlydrawnrob / print-first-css

0 stars 0 forks source link

`body` styles trump `:root` in Anki's cards #60

Open badlydrawnrob opened 6 months ago

badlydrawnrob commented 6 months ago
  1. Anki app sets a default body styles ...
  2. :root has less specificity than body ...
  3. So Anki doesn't respect --font-family in :root
  4. It does render properly on both Safari and Brave, however.

This is a tricky one, I like the idea of using :root and don't see a reason to change it really. It involves repeating those styles in body for Anki themes. As it works for all browsers I've tested using :root this seems like an Anki-specific bug.