parseStylesheet = (css, dynamic) => {
  /** @type {import('./types.js').StylesheetRule[]} */
  const rules = [];
  const ast = csstree.parse(css, {
    parseValue: false,
    parseAtrulePrelude: false,
  });
  csstree.walk(ast, (cssNode) => {
    if (cssNode.type === 'Rule') {
      rules.push(...parseRule(cssNode, dynamic || false));
      return csstreeWalkSkip;
    }
    if (cssNode.type === 'Atrule') {
      if (
        [
          'keyframes',
          '-webkit-keyframes',
          '-o-keyframes',
          '-moz-keyframes',
        ].includes(cssNode.name)
      ) {
        return csstreeWalkSkip;
      }
      csstree.walk(cssNode, (ruleNode) => {
        if (ruleNode.type === 'Rule') {
          rules.push(...parseRule(ruleNode, dynamic || true));
          return csstreeWalkSkip;
        }
      });
      return csstreeWalkSkip;
    }
  });
  return rules;
}
@param {string} css
@param {boolean} dynamic
@returns {import('./types.js').StylesheetRule[]}