Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Aug 25, 2016
2 parents 1a19664 + 3aad79d commit ba3fa55
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,20 @@ function context () {
e.style.setProperty(s, val)
}))
} else
e.style.setProperty(s, l[k][s])
var match = l[k][s].match(/(.*)\W+!important\W*$/);
if (match) {
e.style.setProperty(s, match[1], 'important')
} else {
e.style.setProperty(s, l[k][s])
}
})(s, l[k][s])
}
} else if (k.substr(0, 5) === "data-") {
} else if(k === 'attrs') {
for (var v in l[k]) {
e.setAttribute(v, l[k][v])
}
}
else if (k.substr(0, 5) === "data-") {
e.setAttribute(k, l[k])
} else {
e[k] = l[k]
Expand Down

0 comments on commit ba3fa55

Please sign in to comment.