Skip to content

Conversation

@bradlc
Copy link
Contributor

@bradlc bradlc commented Apr 4, 2022

This PR updates the theme.fontSize types so so you can mix the different formats. Currently all of the values need to have the same format, e.g.

// ✅
module.exports = {
  theme: {
    fontSize: {
      foo: '4rem',
      bar: '5rem',
    },
  },
}

// ✅
module.exports = {
  theme: {
    fontSize: {
      foo: ['4rem', '6rem'],
      bar: ['5rem', '7rem'],
    },
  },
}

// ❌
module.exports = {
  theme: {
    fontSize: {
      foo: '4rem',
      bar: ['5rem', '7rem'],
    },
  },
}

@bradlc bradlc requested a review from RobinMalfait April 4, 2022 11:00
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, I totally forgot that you could mix those values and that you don't have to choose between one syntax or another for everything. This makes sense, thanks!

@bradlc bradlc merged commit b9dec5f into master Apr 4, 2022
@bradlc bradlc deleted the types-font-size branch April 4, 2022 13:35
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.

3 participants