Next.js Discord

Discord Forum

tailwindcss custom responsive breakpoint

Unanswered
Satin posted this in #help-forum
Open in Discord
Avatar
SatinOP
custom tailwind max-[1450px]:flex-col don't work on my website anyone experience this and did you find any solutions or I am the one that's wrong here.

7 Replies

Avatar
what are you trying to do? display flex-col above width 1450?
tailwind's breakpoints feature are unfortunately mobile-first. This means you have to define the min instead of the max.

First you have to add the breakpoints here:
https://tailwindcss.com/docs/responsive-design#customizing-your-theme

Then you should be able to do something like this
flex-col wide:flex-row

(flex-col up until 1450px, otherwise flex-row)
Avatar
SatinOP
Basically I want to add flex col when browser size reach 1450px.

Researched about it and tailwind has custom arbitrary values with max-[]:
Image
Avatar
maybe there are other breakpoints that are conflicting with your max-[1450px]?
try hovering max-[1450px]:flex-col with your mouse
Avatar
SatinOP
It did actually work will try some fixing on my code. Hope to get this solved. Thanks!