tweak pixel equivalent comment spacing (#200)

master
Brad Cornes 2021-02-07 20:58:41 +00:00
parent 14f0fe9f3f
commit 5a810fd193
2 changed files with 2 additions and 2 deletions

View File

@ -952,7 +952,7 @@ function stringifyDecls(
const px = showPixelEquivalents const px = showPixelEquivalents
? remToPx(value, rootFontSize) ? remToPx(value, rootFontSize)
: undefined : undefined
return `${prop}: ${value}${px ? ` /*${px}*/` : ''};` return `${prop}: ${value}${px ? `/* ${px} */` : ''};`
}) })
.join(' ') .join(' ')
) )

View File

@ -61,7 +61,7 @@ export function stringifyCss(
const propStr = ensureArray(obj[curr]) const propStr = ensureArray(obj[curr])
.map((val) => { .map((val) => {
const px = showPixelEquivalents ? remToPx(val, rootFontSize) : undefined const px = showPixelEquivalents ? remToPx(val, rootFontSize) : undefined
return `${indentStr + indent}${curr}: ${val}${px ? ` /*${px}*/` : ''};` return `${indentStr + indent}${curr}: ${val}${px ? `/* ${px} */` : ''};`
}) })
.join('\n') .join('\n')
return `${acc}${i === 0 ? '' : '\n'}${propStr}` return `${acc}${i === 0 ? '' : '\n'}${propStr}`