Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve explicit transition duration and timing function when overriding transition property #14490

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

adamwathan
Copy link
Member

This PR changes the behavior of the transition-{property} utilities to respect any explicit timing function or duration set by the user using the ease-* and duration-* utilities.

Say you have this HTML:

<div class="transition-colors duration-500 ease-out lg:transition-all">

Currently, the transition-duration and transition-timing-functions will be reset to their default values at the lg breakpoint even though you've provided explicit values for them.

After this PR is merged, those values will be preserved at the lg breakpoint.

This PR also adds duration-initial and ease-initial utilities to "unset" explicit duration/timing-function values so that the defaults from classes like transition-all will kick in, without having to specify their explicit values.

Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just missing a changelog entry.

@adamwathan adamwathan force-pushed the feat/preserve-transition-properties branch from ee228c6 to 983014d Compare September 23, 2024 13:07
@adamwathan adamwathan force-pushed the feat/preserve-transition-properties branch from 983014d to b66b14d Compare September 23, 2024 14:20
@adamwathan adamwathan merged commit 6d43a8b into next Sep 23, 2024
2 of 3 checks passed
@adamwathan adamwathan deleted the feat/preserve-transition-properties branch September 23, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants