Skip to content

Commit 5bd2425

Browse files
committed
cleanup leftover @layer nodes
1 parent 9349716 commit 5bd2425

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/jit/lib/expandTailwindAtRules.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,5 +238,12 @@ export default function expandTailwindAtRules(context) {
238238

239239
// Clear the cache for the changed files
240240
context.changedContent = []
241+
242+
// Cleanup any leftover @layer atrules
243+
root.walkAtRules('layer', (rule) => {
244+
if (Object.keys(layerNodes).includes(rule.params)) {
245+
rule.remove()
246+
}
247+
})
241248
}
242249
}

0 commit comments

Comments
 (0)