79512935

Date: 2025-03-16 17:17:15
Score: 0.5
Natty:
Report link

As of Tailwind v4, the media queries and the answer should be:

.your-class {
    @apply your-rules
}

@variant sm {
    .your-class {
        @apply your-rules-for-the-sm-breakpoint-and-above
    }
}

@variant md  {
    .your-class {
        @apply your-rules-for-the-md-breakpoint-and-above
    }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Josh Smith