matthijs110 / chromium-country-flags

Replaces mysterious country codes automatically with the corresponding flag. The solution for Chromium users on Windows!
Other
33 stars 4 forks source link

Version 2.0.1: Preserve custom fonts set by style attributes #5

Closed matthijs110 closed 4 months ago

matthijs110 commented 4 months ago

Fixes issue #4 where icons set using the style attribute were overwritten by the custom CSS created by the extension. The described issue is rare, as each individual icon has inline styles applied to it. Normally icon libraries will use common CSS.

Version 2.0.1 will additionally iterate over each (mutated) DOM element to check if there are any style attributes present with a font-family property. If so: it will append !important to override the font-family set/modified by the extention. This may seem heavy, but all non relevant elements are skipped.