Skip to content

Fix parsing of theme() inside calc() when there are no spaces around operators #11157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 4, 2023
Merged
Prev Previous commit
Next Next commit
Don’t resolve functions for anything not using theme or screen
  • Loading branch information
thecrypticace committed May 4, 2023
commit f04fa9d173948fdabfcf12a6f081055fbeccb6a8
2 changes: 2 additions & 0 deletions src/lib/evaluateTailwindFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ function resolveVNode(node, vNode, functions) {
}

function resolveFunctions(node, input, functions) {
let hasAnyFn = Object.keys(functions).some((fn) => input.includes(`${fn}(`))
if (!hasAnyFn) return input
return parseValue(input)
.walk((vNode) => {
resolveVNode(node, vNode, functions)
Expand Down