File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export function compileCandidates(
49
49
50
50
let flags = CompileAstFlags . None
51
51
52
- if ( respectImportant || respectImportant === undefined ) {
52
+ if ( respectImportant ?? true ) {
53
53
flags |= CompileAstFlags . RespectImportant
54
54
}
55
55
@@ -136,7 +136,7 @@ export function compileAstNodes(
136
136
let asts = compileBaseUtility ( candidate , designSystem )
137
137
if ( asts . length === 0 ) return [ ]
138
138
139
- let respectImportant = Boolean ( flags & CompileAstFlags . RespectImportant )
139
+ let respectImportant = designSystem . important && Boolean ( flags & CompileAstFlags . RespectImportant )
140
140
141
141
let rules : {
142
142
node : AstNode
@@ -154,7 +154,7 @@ export function compileAstNodes(
154
154
// If the candidate itself is important then we want to always mark
155
155
// the utility as important. However, at a design system level we want
156
156
// to be able to opt-out when using things like `@apply`
157
- if ( candidate . important || ( designSystem . important && respectImportant ) ) {
157
+ if ( candidate . important || respectImportant ) {
158
158
applyImportant ( nodes )
159
159
}
160
160
Original file line number Diff line number Diff line change @@ -141,9 +141,7 @@ export function buildDesignSystem(theme: Theme): DesignSystem {
141
141
parseVariant ( variant : string ) {
142
142
return parsedVariants . get ( variant )
143
143
} ,
144
- compileAstNodes ( candidate : Candidate , flags ?: CompileAstFlags ) {
145
- flags ??= CompileAstFlags . RespectImportant
146
-
144
+ compileAstNodes ( candidate : Candidate , flags = CompileAstFlags . RespectImportant ) {
147
145
return compiledAstNodes . get ( flags ) . get ( candidate )
148
146
} ,
149
147
You can’t perform that action at this time.
0 commit comments