Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify comment
  • Loading branch information
philipp-spiess committed Sep 5, 2024
commit 8e83b35012470e7ccf1ea712006b848602fa897e
5 changes: 3 additions & 2 deletions packages/tailwindcss/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ function cssThemeFn(
if (isArray && themeValue.length === 2) {
// When a tuple is returned, return the first element
resolvedValue = themeValue[0]
// We otherwise only ignore string values here, objects (and namespace maps)
// are treated as non-resolved values for the CSS `theme()` function.
} else if (isArray) {
// Arrays get serialized into a comma-separated lists
resolvedValue = themeValue.join(', ')
} else if (typeof themeValue === 'string') {
// Otherwise only allow string values here, objects (and namespace maps)
// are treated as non-resolved values for the CSS `theme()` function.
resolvedValue = themeValue
}

Expand Down