Theme Configuration

Harmony in proportions, consistency through scale.

The UnoCSS Fluid Sizing preset includes a thoughtfully crafted theme system that provides semantic size names for common CSS properties. Rather than specifying exact min/max values for each utility, you can use these intuitive, human-readable names that automatically scale across different viewport sizes.

Default Theme

The default theme provides predefined values for spacing, border radius, and font sizes. Each value consists of a min/max pair that defines how elements will scale from small to large viewports.

Spacing Scale

Use these semantic sizes with any spacing utility (margin, padding, gap, etc.) for consistent, fluid spacing throughout your design:

NameMin Value (px)Max Value (px)ExampleUse Case
2xs812f-p-2xsVery tight spacing
xs1216f-m-xsCompact elements
sm1624f-gap-smDefault spacing
md2432f-mt-mdMedium separation
lg3248f-pb-lgGenerous spacing
xl4872f-mx-xlSection spacing
2xl7296f-py-2xlMajor section spacing
3xl96128f-p-3xlLayout spacing
4xl128144f-m-4xlLarge layout spacing
5xl144200f-mt-5xlExtra large layout spacing

Border Radius Scale

Create consistent, fluid rounded corners with these semantic values for the f-rounded utility:

NameMin Value (px)Max Value (px)ExampleUse Case
xs24f-rounded-xsSubtle rounding
sm46f-rounded-smLight rounding
md68f-rounded-mdStandard rounding
lg812f-rounded-lgProminent rounding
xl1216f-rounded-xlHigh rounding
2xl1624f-rounded-2xlVery pronounced rounding

Font Size Scale

Create a fluid type system with these semantic values for the f-text utility:

NameMin Value (px)Max Value (px)ExampleUse Case
3xs911f-text-3xsLegal text, footnotes
2xs1012f-text-2xsFine print, captions
xs1214f-text-xsSmall text, secondary info
sm1416f-text-smUI text, form labels
md1616f-text-mdBody text
lg1618f-text-lgLarge body text
xl1822f-text-xlSubheadings
2xl2226f-text-2xlSection headings
3xl2632f-text-3xlMajor headings
4xl3244f-text-4xlHero/feature headings

Customization

Want to tailor these values to your design system? Learn how to build your own custom theme in the Custom Theme Configuration guide.