stephenmk / Jitendex

A free, offline, and openly licensed Japanese-to-English dictionary. Updates weekly!
https://jitendex.org
Creative Commons Attribution Share Alike 4.0 International
267 stars 3 forks source link

Use fallback CSS color variables to fix default rendering in Anki #110

Closed stephenmk closed 4 weeks ago

stephenmk commented 4 weeks ago

Jitendex uses CSS variables defined by Yomitan to adjust the colors of text and shapes when Yomitan's theme is changed from light mode to dark mode. These color variables are not exported to Anki when flashcards are created, so entries are not rendered correctly if the variables have not been defined manually by the user.

I can add fallback variables to Jitendex styles so that the appropriate Anki variables will be used instead if the Yomitan variables cannot be found.

BeforeAfter
![before](https://github.com/user-attachments/assets/d0deebc2-2a8a-4153-985a-16566746a882) ![after](https://github.com/user-attachments/assets/cdc77b46-6114-4f9e-98c7-4a052175afc8)
stephenmk commented 4 weeks ago

Fixed in version 2024.10.07.0