ben-rogerson / twin.macro

🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, solid-styled-components, stitches and goober) at build time.
MIT License
7.92k stars 183 forks source link

Support arrays for fontSize values #710

Closed ben-rogerson closed 2 years ago

ben-rogerson commented 2 years ago

This PR adds support for arrays used for fontSize values:

module.exports = {
  theme: {
    fontSize: {
      sm: ['14px', '20px'], // if second value is a string then it will be used as the lineHeight
      base: ['16px', {
        lineHeight: '24px', // if second value is a object it will be merged
      }],
    }
  }
}

This behaviour is now synced with tailwind font size values.