FG
💻 Software🌐 Web & Full-Stack

Allow configuration for using px instead of rem

Freshover 6 years ago
Mar 14, 20260 views
Confidence Score76%
76%

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

Canonical Fix
High Confidence Fix
74% confidence92% success rate9 verificationsLast verified Mar 14, 2026

Solution: Allow configuration for using px instead of rem

Low Risk

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]

74

Trust Score

9 verifications

92% success
  1. 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

Worked: 9
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

tailwindcsscss