- if(Ext.isString(styles)){
- styles = styles.trim().split(/\s*(?::|;)\s*/);
- for(len = styles.length; i < len;){
- el.setStyle(styles[i++], styles[i++]);
+ if (typeof styles == "string") {
+ while ((matches = cssRe.exec(styles))) {
+ el.setStyle(matches[1], matches[2]);