File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
packages/tailwind/src/utils Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 1- import {
2- type Root ,
3- type Node ,
4- type Declaration ,
5- Rule ,
6- rule as createRule ,
7- decl as createDeclaration ,
8- AtRule ,
9- } from "postcss" ;
1+ import type { Node , Root } from "postcss" ;
2+ import Declaration from "postcss/lib/declaration" ;
3+ import Rule from "postcss/lib/rule" ;
4+ import AtRule from "postcss/lib/at-rule" ;
105import { removeIfEmptyRecursively } from "./remove-if-empty-recursively" ;
116
127const doNodesMatch = ( first : Node | undefined , second : Node | undefined ) => {
@@ -49,7 +44,7 @@ export const resolveAllCSSVariables = (root: Root) => {
4944 ) {
5045 const atRule = otherDecl . parent . parent ;
5146
52- const clonedDeclaration = createDeclaration ( ) ;
47+ const clonedDeclaration = new Declaration ( ) ;
5348 clonedDeclaration . prop = decl . prop ;
5449 clonedDeclaration . value = decl . value . replaceAll (
5550 variable ,
@@ -84,7 +79,7 @@ export const resolveAllCSSVariables = (root: Root) => {
8479 }
8580
8681 for ( const [ atRule , declarations ] of declarationsForAtRules . entries ( ) ) {
87- const equivalentRule = createRule ( ) ;
82+ const equivalentRule = new Rule ( ) ;
8883 equivalentRule . selector = rule . selector ;
8984 equivalentRule . append ( ...declarations ) ;
9085
Original file line number Diff line number Diff line change 11import type { Rule } from "postcss" ;
2- import { parse } from "postcss" ;
2+ import parse from "postcss/lib/parse " ;
33import evaluateTailwindFunctions from "tailwindcss/lib/lib/evaluateTailwindFunctions" ;
44import expandApplyAtRules from "tailwindcss/lib/lib/expandApplyAtRules" ;
55import resolveDefaultsAtRules from "tailwindcss/lib/lib/resolveDefaultsAtRules" ;
You can’t perform that action at this time.
0 commit comments