Skip to content

Commit 33dcd44

Browse files
authored
Fix function colors bug (#2919)
1 parent e86b586 commit 33dcd44

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/lib/evaluateTailwindFunctions.js

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function validatePath(config, path, defaultValue) {
7878
!(
7979
typeof value === 'string' ||
8080
typeof value === 'number' ||
81+
typeof value === 'function' ||
8182
value instanceof String ||
8283
value instanceof Number ||
8384
Array.isArray(value)

src/util/transformThemeValue.js

+4
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@ export default function transformThemeValue(themeSection) {
2121
return (value) => (Array.isArray(value) ? value.join(', ') : value)
2222
}
2323

24+
if (themeSection === 'colors') {
25+
return (value) => (typeof value === 'function' ? value({}) : value)
26+
}
27+
2428
return (value) => value
2529
}

0 commit comments

Comments
 (0)