Skip to content

Conversation

kaltoft
Copy link

@kaltoft kaltoft commented Dec 19, 2024

Description

This PR adds support for defining font sizes in the theme. With this implementation fontSize is strictly set by referencing theme tokens, like with colors and spacing.

const theme = createTheme({
  fontSizes: {
    title: 34,
    h1: 28,
    h2: 22,
    h3: 20,
    body: 16,
  },
  textVariants: {
    defaults: {
      fontSize: 'body',
    },
    heading: {
      fontSize: 'h1',
    },
});

Checklist

@kaltoft
Copy link
Author

kaltoft commented Dec 19, 2024

I have signed the CLA!

@gvarandas gvarandas force-pushed the master branch 9 times, most recently from 334b3da to f86990a Compare March 19, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants