()
| 290 | return (theme) => { |
| 291 | const unknownVars = new Set<string>(); |
| 292 | const modify = () => { |
| 293 | const variableReplaced = replaceCSSVariablesNames( |
| 294 | sourceValue, |
| 295 | (v) => { |
| 296 | if (this.isVarType(v, VAR_TYPE_BG_COLOR)) { |
| 297 | return wrapBgColorVariableName(v); |
| 298 | } |
| 299 | if (this.isVarType(v, VAR_TYPE_BG_IMG)) { |
| 300 | return wrapBgImgVariableName(v); |
| 301 | } |
| 302 | unknownVars.add(v); |
| 303 | return v; |
| 304 | }, |
| 305 | (fallback) => tryModifyBgColor(fallback, theme), |
| 306 | ); |
| 307 | // Check if the property is box-shadow and if so, do a pass-through to modify the shadow. |
| 308 | if (property === 'box-shadow') { |
| 309 | const shadowModifier = getShadowModifierWithInfo(variableReplaced)!; |
| 310 | const modifiedShadow = shadowModifier(theme); |
| 311 | if (modifiedShadow.unparsableMatchesLength !== modifiedShadow.matchesLength) { |
| 312 | return modifiedShadow.result; |
| 313 | } |
| 314 | } |
| 315 | return variableReplaced; |
| 316 | }; |
| 317 | |
| 318 | const modified = modify(); |
| 319 | if (unknownVars.size > 0) { |
nothing calls this directly
no test coverage detected