File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
packages/clerk-js/src/ui/foundations Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/clerk-js ' : patch
3+ ---
4+
5+ Fixes line-height discrepancy between browsers.
Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/clerk-js ' : patch
3+ ---
4+
5+ Updates line-height calculations to follow font-sizing to fix differences across browsers.
Original file line number Diff line number Diff line change @@ -9,22 +9,22 @@ const fontWeights = Object.freeze({
99
1010const lineHeights = Object . freeze ( {
1111 normal : 'normal' ,
12- extraSmall : '1.33333' ,
13- small : '1.38462' ,
14- medium : '1.41176' ,
15- large : '1.45455' ,
12+ extraSmall : '16 / 12' , // = 1.33333
13+ small : '18 / 13' , // = 1.38462
14+ medium : '24 / 17' , // = 1.41176
15+ large : '16 / 11' , // = 1.45455
1616} as const ) ;
1717
1818const letterSpacings = Object . freeze ( {
1919 normal : 'normal' ,
2020} as const ) ;
2121
2222export const FONT_SIZE_SCALE_RATIOS = Object . freeze ( {
23- xs : '11 / 13' , // 0.846154
24- sm : '12 / 13' , // 0.923077
25- md : '1' , // 1.0
26- lg : '17 / 13' , // 1.307692
27- xl : '24 / 13' , // 1.846154
23+ xs : '11 / 13' , // = 0.846154
24+ sm : '12 / 13' , // = 0.923077
25+ md : '1' , // = 1.0
26+ lg : '17 / 13' , // = 1.307692
27+ xl : '24 / 13' , // = 1.846154
2828} as const ) ;
2929
3030export type FontSizeKey = keyof typeof FONT_SIZE_SCALE_RATIOS ;
You can’t perform that action at this time.
0 commit comments