-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
Tailwind: 4.0.4
Build-tool: Vite 6.0.11
Node: 23.5.0
Browser: Chrome/Brave
OS: Windows and Linux
Describe your issue
We are using an anti-pattern with our project. We have been building desktop first and this worked just fine with tailwind v3. When we upgraded to v4 all of our media breakpoints have changed. We have scoured the docs and didn't see any reference to this changing. Here is what we see with the v3 code, and here is what the v4 code is generating.
V3
Code Snippet
<div class="hidden w-full justify-center md:hidden sm:flex">Result in DOM
V4
Code Snippet
<div className="hidden w-full justify-center md:hidden sm:flex">Result in DOM
Here is relevant part of the tailwind.config.js.
/** @type {import('tailwindcss').Config} */
export default {
darkMode: "selector",
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
screens: {
"2xl": { max: "1536px" },
xl: { max: "1280px" },
lg: { max: "1024px" },
md: { max: "900px" },
sm: { max: "600px" },
}
},
plugins: [],
}This worked fine in v3 and hopefully we are just missing something small and this can be fixed without us having to downgrade back to v3.
Metadata
Metadata
Assignees
Labels
No labels



