Last active
January 3, 2022 08:57
-
-
Save sunwoo0706/f5562efafa91f7d08d17e26341c850b2 to your computer and use it in GitHub Desktop.
css font-size units type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type cssFontAbsoluteLengthUnitTokens = 'cm' | 'mm' | 'in' | 'px' | 'pt' | 'pc'; | |
type cssFontRelativeLengthUnitTokens = 'em' | 'ex' | 'ch' | 'rem' | 'vw' | 'vmin' | 'vmax' | '%'; | |
type cssFontContextUnitTokens = 'medium' | 'xx-small' | 'x-small' | 'small' | 'large' | 'x-large' | 'xx-large' | 'initial'; | |
type cssFontUnitType = `${number}${cssFontAbsoluteLengthUnitTokens | cssFontRelativeLengthUnitTokens}` | cssFontContextUnitTokens; | |
interface example { | |
fontSize: cssFontUnitType; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference : https://developer.mozilla.org/ko/docs/Web/CSS/font-size