Created
July 19, 2024 14:25
-
-
Save aaroniker/31656b82b996606ed9187a0088e07555 to your computer and use it in GitHub Desktop.
Panda CSS example config for fluidTypography.ts
This file contains hidden or 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
| import { defineConfig } from '@pandacss/dev'; | |
| import { fluidTypography } from './fluidTypography'; | |
| declare module '@pandacss/dev' { | |
| interface ThemeConfig { | |
| fluidFont: Record<string, FluidFontProps>; | |
| } | |
| } | |
| const config = defineConfig({ | |
| theme: { | |
| extend: { | |
| fluidFont: { | |
| heading: { min: 2, max: 3 }, | |
| body: { min: 1, max: 1.2 }, | |
| custom: { min: 12, max: 16, minVw: 30, maxVw: 90, unit: 'px', vwUnit: 'vw' }, | |
| }, | |
| }, | |
| }, | |
| utilities: { | |
| extend: { | |
| fluidFont: fluidTypography({ | |
| defaultUnit: 'rem', | |
| defaultVwUnit: 'vw', | |
| defaultMinVw: 20, | |
| defaultMaxVw: 80, | |
| }), | |
| }, | |
| }, | |
| }); | |
| export default config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment