issues
search
besteadfast
/
carbon
Steadfast's starter project - Craft CMS, Vite, and DDEV
3
stars
2
forks
source link
Implement Capsize and modify typography system
#60
Open
btbunze
opened
4 months ago
btbunze
commented
4 months ago
This pull request does the following:
Implements Capsize to dynamically import font metrics and automatically-calculate offset
Changes typography class names to be prefixed with "t-"
Allows for a default typography style
Any typography elements with undefined styles will fall back
Defaults are required for necessary style definitions (fontFamily, fontSize, fontWeight, lineHeight)
Adds error handling and console info logging
Prints helpful error if typography.styles or typography.styles.DEFAULT are missing
Prints helpful error if required style definitions are missing from DEFAULT
Prints info log if any styles are falling back to the default
Removes list, blockquote, and subheading styles from typography system (we should discuss if/how we want to handle these going forward)
Makes letter spacing tailwind classes consistent (scale based on .01em with leading 0s)
Dynamically generates line heights between 1 and 2
Continues to leverage ESM in more places
This pull request does the following: