lib/api/css.js
function parse(styles) {
  styles = (styles || '').trim();

  if (!styles) return {};

  return styles
    .split(';')
    .reduce(function(obj, str){
      var n = str.indexOf(':');
      // skip if there is no :, or if it is the first/last character
      if (n < 1 || n === str.length-1) return obj;
      obj[str.slice(0,n).trim()] = str.slice(n+1).trim();
      return obj;
    }, {});
}
function parse(styles) {
  styles = (styles || '').trim();

  if (!styles) return {};

  return styles
    .split(';')
    .reduce(function(obj, str){
      var n = str.indexOf(':');
      // skip if there is no :, or if it is the first/last character
      if (n < 1 || n === str.length-1) return obj;
      obj[str.slice(0,n).trim()] = str.slice(n+1).trim();
      return obj;
    }, {});
}
function parse ( styles ) { styles = ( styles || '' ) . trim ( ) ; if ( ! styles ) return { } ; return styles . split ( ';' ) . reduce ( function ( obj , str ) { var n = str . indexOf ( ':' ) ; // skip if there is no :, or if it is the first/last character if ( n < 1 || n === str . length - 1 ) return obj ; obj [ str . slice ( 0 , n ) . trim ( ) ] = str . slice ( n + 1 ) . trim ( ) ; return obj ; } , { } ) ; }
Parse `styles`.

@param {String} styles
@return {Object}
@api private
Parse styles .