Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Resolve `borderRadius` when using dot notation inside the `theme()` function.

## [4.0.0-alpha.24] - 2024-09-11

Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/compat/apply-compat-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ let themeUpgradeKeys = {
'--background-opacity': '--opacity',
'--border-color': '--color',
'--border-opacity': '--opacity',
'--border-radius': '--radius',
'--border-spacing': '--spacing',
'--box-shadow-color': '--color',
'--caret-color': '--color',
Expand Down
21 changes: 21 additions & 0 deletions packages/tailwindcss/src/css-functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,27 @@ describe('theme function', () => {
`)
})

test('theme(borderRadius.lg)', async () => {
expect(
await compileCss(css`
@theme {
--radius-lg: 0.5rem;
}
.radius {
border-radius: theme(borderRadius.lg);
}
`),
).toMatchInlineSnapshot(`
":root {
--radius-lg: .5rem;
}

.radius {
border-radius: .5rem;
}"
`)
})

describe('for v3 compatibility', () => {
test('theme(blur.DEFAULT)', async () => {
expect(
Expand Down