Css: Restore the previous style if the new one is rejected

The workaround to be able to change !important styles broke the browser
keeping the old CSS value if the new one was rejected. Revert to the old
value explicitly in such a case.

Fixes #14836
Closes gh-1532