Allow configuration for using px instead of rem
Problem
I don't really know why the previous issues #800 and #968 got closed without a real response. There are as much valid use cases for using `rem` as there are for using `px`. Lets take the simple example of a website builder which has two seperate user interfaces. One that includes all the App Components designed using Tailwind, and another which includes the user generated content. If I would like to scale up or down only the user generated content area of the UI by modifying the `font-size: 16px` property on the body element, it only works if the rest of the user interface has a fixed sizes using `px` instead of `rem`. If everything uses `rem` I can't change the size of things independently of each other.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Allow configuration for using px instead of rem
I had this problem as well, so I did the conversion for font size, spacing and line height (assuming base 16px). I'll leave it here to save somebody some time. <3 tailwind [code block]
Trust Score
9 verifications
- 1
I had this problem as well, so I did the conversion for font size, spacing and l
I had this problem as well, so I did the conversion for font size, spacing and line height (assuming base 16px). I'll leave it here to save somebody some time. <3 tailwind
Validation
Resolved in tailwindlabs/tailwindcss GitHub issue #1232. Community reactions: 134 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep