File tree 2 files changed +7
-12
lines changed
packages/tailwind/src/utils
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" ;
10
5
import { removeIfEmptyRecursively } from "./remove-if-empty-recursively" ;
11
6
12
7
const doNodesMatch = ( first : Node | undefined , second : Node | undefined ) => {
@@ -49,7 +44,7 @@ export const resolveAllCSSVariables = (root: Root) => {
49
44
) {
50
45
const atRule = otherDecl . parent . parent ;
51
46
52
- const clonedDeclaration = createDeclaration ( ) ;
47
+ const clonedDeclaration = new Declaration ( ) ;
53
48
clonedDeclaration . prop = decl . prop ;
54
49
clonedDeclaration . value = decl . value . replaceAll (
55
50
variable ,
@@ -84,7 +79,7 @@ export const resolveAllCSSVariables = (root: Root) => {
84
79
}
85
80
86
81
for ( const [ atRule , declarations ] of declarationsForAtRules . entries ( ) ) {
87
- const equivalentRule = createRule ( ) ;
82
+ const equivalentRule = new Rule ( ) ;
88
83
equivalentRule . selector = rule . selector ;
89
84
equivalentRule . append ( ...declarations ) ;
90
85
Original file line number Diff line number Diff line change 1
1
import type { Rule } from "postcss" ;
2
- import { parse } from "postcss" ;
2
+ import parse from "postcss/lib/parse " ;
3
3
import evaluateTailwindFunctions from "tailwindcss/lib/lib/evaluateTailwindFunctions" ;
4
4
import expandApplyAtRules from "tailwindcss/lib/lib/expandApplyAtRules" ;
5
5
import resolveDefaultsAtRules from "tailwindcss/lib/lib/resolveDefaultsAtRules" ;
You can’t perform that action at this time.
0 commit comments