update insert_rule_before to check mediaqueries