Responsiveness question #16662
Unanswered
danielmorena
asked this question in
Help
Replies: 0 comments
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.
-
Hello! First of all, I’d like to congratulate you on the excellent work.
I have a question regarding responsiveness. In my projects, I define the value of 1 REM based on a proportion, using a rule of three, like this: calc(100vw / [Figma project width] * 10).
This ensures that in the reference layout, 1rem is always equal to 10px. This way, when the user's screen is smaller, the entire app scales down, and when the screen is larger, it scales up, infinitely simplifying responsiveness. I focus on having a vertical and a horizontal layout with small proportional variations.
However, many components from different libraries use 1rem = 16px, making everything 60% smaller. Would it be possible to write a plugin so that the unit follows this logic but compensates for the reduction? That way, I could write values like h-[35rem] (which would translate to height: 350px), while still keeping the default scale (h-2) equivalent to the same pixel size as intented by tailwind.
Beta Was this translation helpful? Give feedback.
All reactions