insertRule method
dynamic
insertRule(})
Implementation
insertRule(String text, int index, {required double windowWidth, required double windowHeight, required bool isDarkMode}) {
// Parse with this stylesheet's href so relative URLs in inserted rules
// resolve against the stylesheet URL, not the document URL.
List<CSSRule> rules = CSSParser(text, href: href)
.parseRules(windowWidth: windowWidth, windowHeight: windowHeight, isDarkMode: isDarkMode);
cssRules.addAll(rules);
}