Skip to content

Commit 7526411

Browse files
committed
expand declarations during signature generation
But only if the internal `ExpandProperties` feature flag is enabled.
1 parent 0bd45f9 commit 7526411

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/tailwindcss/src/signatures.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { atRule, styleRule, toCss, type AstNode } from './ast'
33
import { printArbitraryValue } from './candidate'
44
import { constantFoldDeclaration } from './constant-fold-declaration'
55
import { CompileAstFlags, type DesignSystem } from './design-system'
6+
import { expandDeclaration } from './expand-declaration'
67
import * as SelectorParser from './selector-parser'
78
import { ThemeOptions } from './theme'
89
import { DefaultMap } from './utils/default-map'
@@ -107,6 +108,11 @@ function canonicalizeAst(ast: AstNode[], options: SignatureOptions) {
107108
return WalkAction.Replace([])
108109
}
109110

111+
if (options.features & SignatureFeatures.ExpandProperties) {
112+
let replacement = expandDeclaration(node, options.features)
113+
if (replacement) return WalkAction.Replace(replacement)
114+
}
115+
110116
// Normalize percentages by removing unnecessary dots and zeros.
111117
//
112118
// E.g.: `50.0%` → `50%`

0 commit comments

Comments
 (0)