remove `@defaults` when stringifying CSS

master
Brad Cornes 2021-07-05 14:09:33 +01:00
parent eaa76f195a
commit c2a9479a4d
1 changed files with 5 additions and 2 deletions

View File

@ -33,10 +33,13 @@ export async function stringifyRoot(state: State, root: Root, uri?: string): Pro
let showPixelEquivalents = dlv(settings, 'tailwindCSS.showPixelEquivalents', true)
let rootFontSize = dlv(settings, 'tailwindCSS.rootFontSize', 16)
let clone = root
let clone = root.clone()
clone.walkAtRules('defaults', (node) => {
node.remove()
})
if (showPixelEquivalents) {
clone = root.clone()
clone.walkDecls((decl) => {
let px = remToPx(decl.value, rootFontSize)
if (px) {