This commit is contained in:
gorhill 2015-07-20 16:33:07 -04:00
parent 6fd149eb0a
commit 2223f5e457

View file

@ -517,8 +517,14 @@ DOMList.prototype.css = function(prop, value) {
if ( value === undefined ) { if ( value === undefined ) {
return i ? this.nodes[0].style[prop] : undefined; return i ? this.nodes[0].style[prop] : undefined;
} }
if ( value !== '' ) {
while ( i-- ) {
this.nodes[i].style.setProperty(prop, value);
}
return this;
}
while ( i-- ) { while ( i-- ) {
this.nodes[i].style[prop] = value; this.nodes[i].style.removeProperty(prop);
} }
return this; return this;
}; };