@@ -82,33 +82,22 @@ const colorPalette: Record<
8282
8383const fontPalette : Record <
8484 string ,
85- {
86- size : string
87- lineHeight : string
88- }
85+ [ string , { lineHeight : string ; letterSpacing : string } ]
8986> = {
90- heading1 : { size : '40px ' , lineHeight : '54px ' } ,
91- heading2 : { size : '28px ' , lineHeight : '36px ' } ,
92- heading3 : { size : '24px ' , lineHeight : '32px ' } ,
93- heading4 : { size : '22px ' , lineHeight : '30px ' } ,
94- heading5 : { size : '20px ' , lineHeight : '28px ' } ,
95- title1 : { size : '18px ' , lineHeight : '26px ' } ,
96- title2 : { size : '16px ' , lineHeight : '24px ' } ,
97- body1 : { size : '16px ' , lineHeight : '24px ' } ,
98- body2 : { size : '15px ' , lineHeight : '22px ' } ,
99- body3 : { size : '14px ' , lineHeight : '20px ' } ,
100- caption1 : { size : '13px ' , lineHeight : '18px ' } ,
101- caption2 : { size : '12px ' , lineHeight : '16px ' } ,
87+ heading1 : [ '40px' , { lineHeight : '54px ' , letterSpacing : '-0.02em ' } ] ,
88+ heading2 : [ '28px' , { lineHeight : '36px ' , letterSpacing : '-0.02em ' } ] ,
89+ heading3 : [ '24px' , { lineHeight : '32px ' , letterSpacing : '-0.02em ' } ] ,
90+ heading4 : [ '22px' , { lineHeight : '30px ' , letterSpacing : '-0.02em ' } ] ,
91+ heading5 : [ '20px' , { lineHeight : '28px ' , letterSpacing : '-0.02em ' } ] ,
92+ title1 : [ '18px' , { lineHeight : '26px ' , letterSpacing : '-0.02em ' } ] ,
93+ title2 : [ '16px' , { lineHeight : '24px ' , letterSpacing : '-0.02em ' } ] ,
94+ body1 : [ '16px' , { lineHeight : '24px ' , letterSpacing : '-0.02em ' } ] ,
95+ body2 : [ '15px' , { lineHeight : '22px ' , letterSpacing : '-0.02em ' } ] ,
96+ body3 : [ '14px' , { lineHeight : '20px ' , letterSpacing : '-0.02em ' } ] ,
97+ caption1 : [ '13px' , { lineHeight : '18px ' , letterSpacing : '-0.02em ' } ] ,
98+ caption2 : [ '12px' , { lineHeight : '16px ' , letterSpacing : '-0.02em ' } ] ,
10299}
103100
104- const fontSize = Object . fromEntries (
105- Object . entries ( fontPalette ) . map ( ( [ key , { size } ] ) => [ key , size ] )
106- )
107-
108- const lineHeight = Object . fromEntries (
109- Object . entries ( fontPalette ) . map ( ( [ key , { lineHeight } ] ) => [ key , lineHeight ] )
110- )
111-
112101const px0_20 = Array . from ( Array ( 21 ) ) . reduce (
113102 ( acc , _ , i ) => {
114103 acc [ i ] = `${ i } px`
@@ -148,8 +137,7 @@ const config: Config = {
148137 lg : { min : '1200px' } ,
149138 } ,
150139 borderWidth : px0_20 ,
151- fontSize,
152- lineHeight,
140+ fontSize : fontPalette ,
153141 minWidth : px0_1200 ,
154142 minHeight : px0_1200 ,
155143 spacing : px0_1200 ,
0 commit comments