grssam / User-Style-Manager

Source Code for the addon User Style Manager
https://addons.mozilla.org/en-US/firefox/addon/user-style-manager/
28 stars 4 forks source link

Bad "!important" check: "!potato" works fine. #49

Closed Drugoy closed 4 months ago

Drugoy commented 12 years ago

Currently, seems like USM uses it's own rules, which don't fit the CSS standard.

toolbarbutton { background-color: red ! }
toolbarbutton { background-color: grey !potato; }

These styles work, although they shouldn't.

Obviously, there is a bad check in the code: it checks whether anything after "!" contains any letters other than "i", "m", "p", "o", "r", "t", "a" and "n".

So "!ports" won't work, because it fails this check due to present illegal letter "s", but "!port", "!ramp" and "!it" won't fail this check and the style will get applied.

grssam commented 12 years ago

This will also be solved, once the property validation is done.