export function parseCss(css) {
  const cssFormat = css.trim();
  const tokenizer = /\s*([a-z-]+)\s*:\s*((?:[^;]*url\(.*?\)[^;]*|[^;]*)*)\s*(?:;|$)/gi;
  const obj = {};
  let token;

  while ((token = tokenizer.exec(cssFormat))) {
    if (token[2] && token[2] !== 'null') {
      obj[
        token[1].replace(/-([a-z])/g, function (g) {
          return g[1].toUpperCase();
        })
      ] = token[2];
    }
  }

  return obj;
}
