| 334 | } as const; |
| 335 | |
| 336 | function font(value: keyof typeof fontSize) { |
| 337 | let type = value.split('-')[0]; |
| 338 | let size = fontSize[value]; |
| 339 | return { |
| 340 | fontFamily: fontFamily[type === 'code' ? 'code' : 'sans'], |
| 341 | '--fs': `pow(1.125, ${size})`, |
| 342 | fontSize: `round(${fontSizeCalc} / 16 * 1rem, 1px)`, |
| 343 | fontWeight: |
| 344 | fontWeight[type === 'heading' || type === 'title' || type === 'detail' ? type : 'normal'], |
| 345 | lineHeight: lineHeight[type], |
| 346 | color: fontColor[type as keyof typeof fontColor] |
| 347 | }; |
| 348 | } |
| 349 | |
| 350 | function margin(value: keyof typeof marginTop) { |
| 351 | return { |