Replies: 1 comment 1 reply
-
Hey! The default spacing scale is already defined based on rem: @theme {
--spacing: 0.25rem;
} So each number is a multiple of one-quarter of rem, meaning |
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
-
🚀 Feature Request: Add Explicit
rem
-Based Sizing Utilities (w-64rem
,h-32rem
,max-w-80rem
)📖 Summary
Tailwind CSS currently uses abstract naming conventions for sizing utilities (e.g.,
w-5
,w-5xl
,max-w-7xl
). While powerful, these can be unintuitive and require frequent config lookups. I propose adding explicitrem
-based utilities (likew-64rem
) for better clarity, design system alignment, and developer experience.🎯 Problem Statement
Ambiguous Naming
w-5
=1.25rem
(spacing scale) vsw-5xl
=64rem
(container scale) → Same number, wildly different meanings.Design Tool Misalignment
Tools like Figma/Sketch/XD use
rem
/px
units, forcing manual conversion to Tailwind's abstract classes.Accessibility Concerns
While Tailwind uses
rem
under the hood, the abstraction hides this from developers who need to enforcerem
-based layouts.💡 Proposed Solution
Introduce direct
rem
-based utilities for sizing:🌟 Why This Matters
Tailwind excels at utility-first CSS, but abstraction shouldn't come at the cost of clarity. This change would:
🌟 Request
Please consider adding
rem
-based sizing utilities to Tailwind core or as an official plugin.Thank you for building such an amazing tool!
(Let me know if you'd like additional details or data to support this proposal.)
Beta Was this translation helpful? Give feedback.
All reactions