parseCssRuleSelectors function

List<String> parseCssRuleSelectors(
  1. CssRule cssRule
)

Parses the selectors of cssRule.

Implementation

List<String> parseCssRuleSelectors(CssRule cssRule) {
  if (cssRule is CssStyleRule) {
    var selectorText = cssRule.selectorText.trim();
    var list = parseStringFromInlineList(selectorText, RegExp(r'\s*,\s*'));
    return list ?? <String>[];
  } else {
    return parseCssRuleTextSelectors(cssRule.cssText);
  }
}