[v4] Can't remove max-width
on container
utility
#15092
-
What version of Tailwind CSS are you using? v4.0.0-beta.1 What build tool (or framework if it abstracts the build tool) are you using?
What version of Node.js are you using? v20 What browser are you using? Chrome What operating system are you using? macOS Reproduction URL https://play.tailwindcss.com/2Gw5xBur52?file=css Describe your issue I have custom Unfortunately, after upgrading to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Yeah that utility now clashes with our fallback for the v3 You can unset that behavior via a custom media query overwrite. Our v4 recommendation is to not use the @utility container {
@media (width >= 40rem) {
@apply max-w-none;
}
} |
Beta Was this translation helpful? Give feedback.
Does this solution work for your needs?
https://play.tailwindcss.com/u0Wa8T7tzY?file=css
Or do you actually need your custom
container
to be defined as a utility so you can combine it with variants likemd:container
? If so this solution might work:https://play.tailwindcss.com/q4Z8RhOgvr?file=css