Skip to content

Commit c2a9479

Browse files
committed
remove @defaults when stringifying CSS
1 parent eaa76f1 commit c2a9479

File tree

1 file changed

+5
-2
lines changed
  • packages/tailwindcss-language-service/src/util

1 file changed

+5
-2
lines changed

packages/tailwindcss-language-service/src/util/jit.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ export async function stringifyRoot(state: State, root: Root, uri?: string): Pro
3333
let showPixelEquivalents = dlv(settings, 'tailwindCSS.showPixelEquivalents', true)
3434
let rootFontSize = dlv(settings, 'tailwindCSS.rootFontSize', 16)
3535

36-
let clone = root
36+
let clone = root.clone()
37+
38+
clone.walkAtRules('defaults', (node) => {
39+
node.remove()
40+
})
3741

3842
if (showPixelEquivalents) {
39-
clone = root.clone()
4043
clone.walkDecls((decl) => {
4144
let px = remToPx(decl.value, rootFontSize)
4245
if (px) {

0 commit comments

Comments
 (0)