Grouping Utility Classes by Breakpoint #13919
Shreyas-009
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
There have been suggestions about adding such a feature. The maintainers have addressed this request before, that you may wish to read up on if you have not already done so: |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Description :
I would like to request a feature that allows grouping of utility classes under specific breakpoints in Tailwind CSS. This would streamline responsive design by enabling syntax like sm: [ p-2 m-5 ] and md: [ p-5 m-10 ] to apply multiple classes at once based on screen size. This feature would improve readability and maintainability in responsive projects, aligning with Tailwind's utility-first philosophy.
Use Cases :
1] Simplifying responsive design syntax for developers.
2] Enhancing code organization and readability.
3] Providing more flexible and expressive styling options.
Implementation Ideas :
One approach could be extending the current responsive design utilities to accept arrays of classes, allowing for grouped class application based on Tailwind CSS's official breakpoints (sm, md, lg, xl).
I believe this feature would benefit many Tailwind CSS users and improve the overall developer experience. Thank you for considering this request!
Beta Was this translation helpful? Give feedback.
All reactions