Tailwind Typography's weird values

Tailwind uses some em values with lots of digits, e.g. 0.5714286em. Where do those come from? Is that some golden ratio-based thing? I think 0.6em probably looks the same for any reasonable font-size at any resolution.
4 Replies
clevermissfox
clevermissfox3mo ago
The golden ratio is 1.618 so the decimal you have mentioned is not a result from a golden ratio . The specific value 0.5714286em is likely derived from a fractional conversion. It's approximately equal to 4/7 or 0.571428571... when converted to a decimal. What property did you find this value on ? Was it padding like your example in the other post ?
jcayzac
jcayzac3mo ago
It's everywhere in Tailwind Typography. For instance padding on .sm\:prose tbody td. I wish their design decisions were documented.
jcayzac
jcayzac3mo ago
No description
jcayzac
jcayzac3mo ago
(taken now from https://tailwindcss-typography.vercel.app/ ) Ah from the code it's 8/14 ok, it's a contrived way to say 0.5rem because they don't actually redefine 1rem depending on the viewport size. It looks like I can get rid of that since my rem is variable. ahh I get it, it's for nesting
Want results from more Discord servers?
Add your server