Skip to content
Discussion options

You must be logged in to vote

1. import defaultTheme from 'tailwindcss/defaultTheme';

There is no real equivalent. I can see you're only using it here:

screens: {
  // it is important to override the screens config
  // otherwise the css is not sorted correctly and
  // then some of the new states will overrule the
  // more fitting rules while later in source.
  xs: '360px',
  ...defaultTheme.screens,
},

But this hasn't been neccessary since perhaps v3.3 or v3.4 - breakpoints are sorted for you most of the time. You can do:

@theme {
  --breakpoint-xs: 22.5rem;
}

Note that it's important to always use the same unit for defining your breakpoints or the generated utilities may be sorted in an unexpected order, causing …

Replies: 1 comment 4 replies

Comment options

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

@TomFreudenberg
Comment options

@wongjn
Comment options

wongjn Aug 7, 2025
Collaborator

@TomFreudenberg
Comment options

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