@@ -4619,9 +4619,12 @@ export function createCssUtility(node: AtRule) {
4619
4619
designSystem . utilities . functional ( name . slice ( 0 , - 2 ) , ( candidate ) => {
4620
4620
let atRule = structuredClone ( node )
4621
4621
4622
+ let value = candidate . value
4623
+ let modifier = candidate . modifier
4624
+
4622
4625
// A value is required for functional utilities, if you want to accept
4623
4626
// just `tab-size`, you'd have to use a static utility.
4624
- if ( candidate . value === null ) return
4627
+ if ( value === null ) return
4625
4628
4626
4629
// Whether `--value(…)` was used
4627
4630
let usedValueFn = false
@@ -4667,7 +4670,7 @@ export function createCssUtility(node: AtRule) {
4667
4670
if ( valueNode . value === '--value' ) {
4668
4671
usedValueFn = true
4669
4672
4670
- let resolved = resolveValueFunction ( candidate . value ! , valueNode , designSystem )
4673
+ let resolved = resolveValueFunction ( value , valueNode , designSystem )
4671
4674
if ( resolved ) {
4672
4675
resolvedValueFn = true
4673
4676
if ( resolved . ratio ) {
@@ -4689,14 +4692,14 @@ export function createCssUtility(node: AtRule) {
4689
4692
else if ( valueNode . value === '--modifier' ) {
4690
4693
// If there is no modifier present in the candidate, then the
4691
4694
// declaration can be removed.
4692
- if ( candidate . modifier === null ) {
4695
+ if ( modifier === null ) {
4693
4696
replaceDeclarationWith ( [ ] )
4694
4697
return ValueParser . ValueWalkAction . Skip
4695
4698
}
4696
4699
4697
4700
usedModifierFn = true
4698
4701
4699
- let replacement = resolveValueFunction ( candidate . modifier ! , valueNode , designSystem )
4702
+ let replacement = resolveValueFunction ( modifier , valueNode , designSystem )
4700
4703
if ( replacement ) {
4701
4704
resolvedModifierFn = true
4702
4705
replaceWith ( replacement . nodes )
@@ -4726,7 +4729,7 @@ export function createCssUtility(node: AtRule) {
4726
4729
4727
4730
// When a candidate has a modifier, then the `--modifier(…)` must
4728
4731
// resolve correctly or the `--value(ratio)` must resolve correctly.
4729
- if ( candidate . modifier && ! resolvedRatioValue && ! resolvedModifierFn ) return null
4732
+ if ( modifier && ! resolvedRatioValue && ! resolvedModifierFn ) return null
4730
4733
4731
4734
// Resolved `--value(ratio)`, so all other declarations that didn't use
4732
4735
// `--value(ratio)` should be removed. E.g.: `--value(number)` would
0 commit comments