Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Ensure `theme` values defined outside of `extend` in JS configuration files overwrite all existing values for that namespace ([#14672](https://github.com/tailwindlabs/tailwindcss/pull/14672))
- Remove unnecessary variable fallbacks in gradient utilities ([#14705](https://github.com/tailwindlabs/tailwindcss/pull/14705))
- _Upgrade (experimental)_: Speed up template migrations ([#14679](https://github.com/tailwindlabs/tailwindcss/pull/14679))
- _Upgrade (experimental)_: Don't generate invalid CSS when migrating a complex `screens` config ([#14691](https://github.com/tailwindlabs/tailwindcss/pull/14691))

Expand Down
37 changes: 21 additions & 16 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9566,42 +9566,42 @@ test('bg', async () => {

.bg-gradient-to-b {
--tw-gradient-position: to bottom, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-bl {
--tw-gradient-position: to bottom left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-br {
--tw-gradient-position: to bottom right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-l {
--tw-gradient-position: to left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-r {
--tw-gradient-position: to right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-t {
--tw-gradient-position: to top, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-tl {
--tw-gradient-position: to top left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-gradient-to-tr {
--tw-gradient-position: to top right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-\\[1\\.3rad\\] {
Expand All @@ -9614,44 +9614,49 @@ test('bg', async () => {
background-image: linear-gradient(var(--tw-gradient-stops, 125deg));
}

.bg-linear-\\[to_bottom\\], .bg-linear-to-b {
.bg-linear-\\[to_bottom\\] {
--tw-gradient-position: to bottom, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom));
}

.bg-linear-to-b {
--tw-gradient-position: to bottom, ;
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-bl {
--tw-gradient-position: to bottom left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-br {
--tw-gradient-position: to bottom right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to bottom right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-l {
--tw-gradient-position: to left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-r {
--tw-gradient-position: to right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-t {
--tw-gradient-position: to top, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-tl {
--tw-gradient-position: to top left, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top left));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-linear-to-tr {
--tw-gradient-position: to top right, ;
background-image: linear-gradient(var(--tw-gradient-stops, to top right));
background-image: linear-gradient(var(--tw-gradient-stops));
}

.bg-\\[image\\:var\\(--my-gradient\\)\\] {
Expand Down
6 changes: 3 additions & 3 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2517,12 +2517,12 @@ export function createUtilities(theme: Theme) {
]) {
staticUtility(`bg-gradient-to-${value}`, [
['--tw-gradient-position', `to ${direction},`],
['background-image', `linear-gradient(var(--tw-gradient-stops, to ${direction}))`],
['background-image', `linear-gradient(var(--tw-gradient-stops))`],
])

staticUtility(`bg-linear-to-${value}`, [
['--tw-gradient-position', `to ${direction},`],
['background-image', `linear-gradient(var(--tw-gradient-stops, to ${direction}))`],
['background-image', `linear-gradient(var(--tw-gradient-stops))`],
])
}

Expand Down Expand Up @@ -2578,7 +2578,7 @@ export function createUtilities(theme: Theme) {

return [
decl('--tw-gradient-position', `from ${value},`),
decl('background-image', `conic-gradient(var(--tw-gradient-stops,from ${value}))`),
decl('background-image', `conic-gradient(var(--tw-gradient-stops))`),
]
}
})
Expand Down