This commit is contained in:
gorhill 2015-07-20 16:33:07 -04:00
parent 6fd149eb0a
commit 2223f5e457
1 changed files with 7 additions and 1 deletions

View File

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