function getStyle(el, pseudo = null) {
  if (!(el instanceof Element)) {
    return window.getComputedStyle(el, pseudo);
  }

  let map = computedStyleCache.get(el);
  if (!map) {
    map = new Map();
    computedStyleCache.set(el, map);
  }

  if (!map.has(pseudo)) {
    const st = window.getComputedStyle(el, pseudo);
    map.set(pseudo, st);
  }

  return map.get(pseudo);
}
Gets the computed style for an element or pseudo-element, with caching.

@param {Element} el - The element
@param {string|null} [pseudo=null] - The pseudo-element
@returns {CSSStyleDeclaration} The computed style