Replies: 1 comment 1 reply
-
Seems to be working in this Tailwind Play which would suggest something particular to project that is causing the unexpected behavior. Consider providing a git repo that reproduces your issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
When using arbitrary values with responsive modifiers in Tailwind CSS v4, the responsive styles are not being applied correctly. This behavior differs from previous versions where it worked as expected.
Current Behavior
Expected Behavior
All responsive modifiers should be applied according to the breakpoint, regardless of whether they use arbitrary values or utility classes.
Working Cases:
// Utility + Utility
<p className="font-light md:font-bold">
// Both light and bold are applied at respective breakpoints
// Utility + Arbitrary
<p className="font-light md:font-[600]">
// Both light and 600 are applied at respective breakpoints
Not Working Cases:
// Arbitrary + Utility
<p className="font-[300] md:font-bold">
// Only font-[300] is applied, md:font-bold is ignored
// Arbitrary + Arbitrary
<p className="font-[300] md:font-[600]">
// Only font-[300] is applied, md:font-[600] is ignored
// Similar issues with other properties
<p className="text-[12px] sm:text-[15px]">
Environment
Beta Was this translation helpful? Give feedback.
All reactions