Skip to content

Commit

Permalink
cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzetsu committed Dec 6, 2020
1 parent 9c825cb commit 7d7a230
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const makeZ = (conf = {}) => {
// everything else is a css var
prop = '--' + prop.slice(1)
}
// helper handling
// handle helpers
const helper = runHelper(prop, value)
if (helper) {
const parsed = parseRules(helper)
Expand All @@ -260,14 +260,14 @@ const makeZ = (conf = {}) => {
return
}
if (!value) return debug && err('no value for', prop)
// shorthand handling
// handle shorthands
prop = short[prop] || prop
// auto-prefix / invalid key warning
// auto-prefix
if (!validProps[prop]) {
const prefixed = `-${vendorPrefix}-${prop}`
if (validProps[prefixed]) prop = prefixed
}
// replace $ var refs with css var refs
// convert var refs
if (value.indexOf('$') >= 0) value = value.replace(/\$([a-z0-9-]+)/gi, 'var(--$1)')
// auto-px
if (needsPx(prop))
Expand Down

0 comments on commit 7d7a230

Please sign in to comment.