Skip to content

any reason why transition property is not atomic? #13924

Answered by adamwathan
herzaso asked this question in Help
Discussion options

You must be logged in to vote

Like @wongjn mentioned, we do this so you can add a transition with a single utility instead of always having to add three classes, and let you override the timing function and duration with other utilities as necessary.

There are a number of utilities in Tailwind that do this sort of thing, for example font size utilities like text-xl also set a line-height value, and the border utility effectively sets a border-style and a border-width so you don't have to write border border-solid to get a border.

Two options for your particular situation:

  1. Remove the defaults for transition-timing-function and transition-duration in your theme:

    /** @type {import('tailwindcss').Config} */
    export default 

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@wongjn
Comment options

@herzaso
Comment options

@wongjn
Comment options

@herzaso
Comment options

Comment options

You must be logged in to vote
1 reply
@herzaso
Comment options

Answer selected by herzaso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants