CSSStyleSheet.insertRule() deprecation fix

This is a fix for the deprecated one argument call to CSSStyleSheet.insertRule(). The current approach causes a failure in Firefox for add_custom_rule and a deprecation warning in Chrome. It also causes unexpected behavior for overlapping rules (where the order of the method calls is not respected).