Office-of-Digital-Services / California-Design-System

GNU General Public License v2.0
0 stars 0 forks source link

Add font-size-base adjuster #33

Closed xjensen closed 1 month ago

xjensen commented 1 month ago

Adds in the font-size-adjuster from Ryan's original typography codepen. It works a little bit differently here compared to the pen.

In the pen, the --font-size-adjustment is a separate value that's added to (or subtracted from) .7rem. The default is .3rem. So .7rem + .3rem comes out to 1rem.

Here, we're just making --font-size-base a whole number that can be adjusted. And the default is 1rem. Anyone who wants to customize this can just change that base number, instead of doing addition/subtraction. I think it's a little bit easier to document and reason about it this way.