2.1.55 & 2.1.56 - Dark mode overwrites font size root variable

Calling this a bug might be saying too much - more of an inconsistency. Already found a fix but maybe there’s a reason this is only happening with the newer versions.

Tested on both 2.1.55 & 2.1.56. All add-ons disabled (other than AnkiWebView Inspector - but I still tested without it as well). I moved up from 2.1.54 and no issues there.


The ‘bug’:
When setting font-size via a :root variable the font-size is overwritten to 15px - but only in dark mode where font-size is inherited from the webkit’s root:night-mode.



Which means that dark and light mode have different font-sizes all of the sudden:

Demonstration for reproduction


Quick fix:
Assign an !important rule to the font-size variable in :root.

Maybe using :root isn’t safe, but I expected dark-mode and light-mode to share the same inheritances. If this is a trade-off for some other improvement then this is negligible of course.


Thanks for your hard work on these newer versions - I’m really liking it!

Deferring to @kleinerpirat on this one

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.