seek-oss / capsize

Flipping how we define typography in CSS.

Home Page:https://seek-oss.github.io/capsize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rems possible?

sanscheese opened this issue · comments

Given that there can be accessibility issues of setting font sizes by px. Can this hold up with returning rems instead of px values?

More info: https://css-tricks.com/is-it-better-to-use-ems-rems-than-px-for-font-size/

I used rems in tailwind-baseline (https://github.com/apkoponen/tailwind-baseline/blob/master/src/utils.js) based on the old basekick (https://github.com/michaeltaranto/basekick) calculations, but I'm not 100% sure this works correctly in all cases. At least some rounding errors might occur. Interested in this too.

Just cleaning up ready for publishing and also adding support for fontSize input.

There have been a number of improvements and refinements to the algorithm this week. Once the dust settles, I am curious to investigate em/rem and/or unitless line heights.