Skip to content

Instantly share code, notes, and snippets.

@aaroniker
Created July 19, 2024 14:25
Show Gist options
  • Select an option

  • Save aaroniker/31656b82b996606ed9187a0088e07555 to your computer and use it in GitHub Desktop.

Select an option

Save aaroniker/31656b82b996606ed9187a0088e07555 to your computer and use it in GitHub Desktop.
Panda CSS example config for fluidTypography.ts
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