Skip to content

Commit

Permalink
fixed decimal point in opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-hahn committed Aug 17, 2012
1 parent 32b0c44 commit 41a4caa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drykup.coffee
Expand Up @@ -115,7 +115,8 @@ expandAttrs = (v = '', styleOnly = false) ->
if (sva = styleValueAliases[part]) then [name, value] = sva.split ':'
else
if (sa = styleAliases[name]) then name = sa
if name != 'z-index' and /^(-|\+)?(\d|\.)+$/.test value then value = value + 'px'
if name not in ['z-index','opacity'] and
/^(-|\+)?(\d|\.)+$/.test value then value = value + 'px'
else value = whiteSpace value
styles[name] = value
style = ("#{k}:#{v}" for k, v of styles).join '; '
Expand Down Expand Up @@ -240,3 +241,4 @@ if module?.exports
module.exports = drykup
else
window.drykup = drykup

0 comments on commit 41a4caa

Please sign in to comment.