You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
A javascript tool for adjusting size, leading, and grades to cast continuously responsive typography. It works over your current CSS as a progressive enhancement.
The script calculates your setting based on minimum and maximum values for font size, line height, variable grades, and container width:
minimum/maximum font size
minimum/maximum line height
minimum/maximum container width
minimum/maximum grades (variable fonts only)
To initialize, add the element to be resized (required)
minWidth_VariableGrade: A variable font weight for the small size, for example450
maxWidth_VariableGrade: A variable font weight for the large size, i.e.400
container: The container width to measure. Defaults to"parent" and can alternately be set to"self".
fontSize_Units: defaultem
For a better sense of context, set your root em to10px withhtml { font-size: 62.5%; }. This makes your em units base 10 so2.4em =24px. But any number will do because once you start adjusting the min/max numbers, the experience is more visual than calculated. And if you prefer a more scientific approach, Textblock gives you the control you need for setting systems like modular scales.
If you’re using variable fonts, theminWidth_VariableGrade /maxWidth_VariableGrade parameters provide a way to simulate grades (micro-variations in weight to set smaller sizes slightly bolder).