code: function parseStyles(s) {
    var parser = new parserlib.css.Parser();
    var result = { property: Object.create(null), priority: Object.create(null) };
    parser.addListener("property", function(e) {
      if (e.invalid) return; // Skip errors
      result.property[e.property.text] = e.value.text;
      if (e.important) result.priority[e.property.text] = 'important';
    });
    s = (''+s).replace(/^;/, '');
    parser.parseStyleAttribute(s);
    return result;
  }
docs: Utility function for parsing style declarations Pass in a string like "margin-left: 5px; border-style: solid" and this function returns an object like {"margin-left":"5px", "border-style":"solid"}