Skip to content

Commit b63f493

Browse files
authored
Make ease-linear a static utility (#14880)
This PR removes `--transition-timing-function-linear` from the default theme in favor of a static `ease-linear` utility. Doesn't make sense for this to be a design token since `linear` can only mean `linear`. This is consistent with how we handle basically every other similar case in the framework. --------- Co-authored-by: Adam Wathan <[email protected]>
1 parent 8d373ec commit b63f493

File tree

6 files changed

+7
-4
lines changed

6 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- Rename `drop-shadow` to `drop-shadow-sm` and `drop-shadow-sm` to `drop-shadow-xs` ([#14849](https://github.com/tailwindlabs/tailwindcss/pull/14849))
3030
- Rename `rounded` to `rounded-sm` and `rounded-sm` to `rounded-xs` ([#14849](https://github.com/tailwindlabs/tailwindcss/pull/14849))
3131
- Rename `blur` to `blur-sm` and `blur-sm` to `blur-xs` ([#14849](https://github.com/tailwindlabs/tailwindcss/pull/14849))
32+
- Remove `--transition-timing-function-linear` from the default theme in favor of a static `ease-linear` utility ([#14880](https://github.com/tailwindlabs/tailwindcss/pull/14880))
3233

3334
## [4.0.0-alpha.31] - 2024-10-29
3435

packages/@tailwindcss-postcss/src/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
399399
--perspective-normal: 500px;
400400
--perspective-midrange: 800px;
401401
--perspective-distant: 1200px;
402-
--transition-timing-function-linear: linear;
403402
--transition-timing-function-in: cubic-bezier(.4, 0, 1, 1);
404403
--transition-timing-function-out: cubic-bezier(0, 0, .2, 1);
405404
--transition-timing-function-in-out: cubic-bezier(.4, 0, .2, 1);

packages/tailwindcss/src/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
398398
--perspective-normal: 500px;
399399
--perspective-midrange: 800px;
400400
--perspective-distant: 1200px;
401-
--transition-timing-function-linear: linear;
402401
--transition-timing-function-in: cubic-bezier(.4, 0, 1, 1);
403402
--transition-timing-function-out: cubic-bezier(0, 0, .2, 1);
404403
--transition-timing-function-in-out: cubic-bezier(.4, 0, .2, 1);

packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,7 @@ exports[`getClassList 1`] = `
19121912
"duration-75",
19131913
"duration-initial",
19141914
"ease-initial",
1915+
"ease-linear",
19151916
"end-0.5",
19161917
"end-1",
19171918
"end-3",

packages/tailwindcss/src/utilities.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3792,7 +3792,11 @@ export function createUtilities(theme: Theme) {
37923792
}
37933793

37943794
staticUtility('ease-initial', [transitionTimingFunctionProperty, ['--tw-ease', 'initial']])
3795-
3795+
staticUtility('ease-linear', [
3796+
transitionTimingFunctionProperty,
3797+
['--tw-ease', 'linear'],
3798+
['transition-timing-function', 'linear'],
3799+
])
37963800
functionalUtility('ease', {
37973801
themeKeys: ['--transition-timing-function'],
37983802
handle: (value) => [

packages/tailwindcss/theme.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@
452452
--perspective-distant: 1200px;
453453

454454
/* Transition timing functions */
455-
--transition-timing-function-linear: linear;
456455
--transition-timing-function-in: cubic-bezier(0.4, 0, 1, 1);
457456
--transition-timing-function-out: cubic-bezier(0, 0, 0.2, 1);
458457
--transition-timing-function-in-out: cubic-bezier(0.4, 0, 0.2, 1);

0 commit comments

Comments
 (0)