Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default letter-spacing per font-size #129

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

ben-rogerson
Copy link
Owner

@ben-rogerson ben-rogerson commented Aug 26, 2020

This PR adds an alternative fontSize config to specify letterSpacing released in Tailwind v1.7.0.

Tailwind docs: Providing a default letter-spacing

// config
module.exports = {
  theme: {
    extend: {
      fontSize: {
        hero: [
          '7rem',
          {
            lineHeight: '80%',
            letterSpacing: '-0.02em'
          }
        ]
      },
    }
  }
}
// usage
<div tw="text-hero text-purple-600">hero text</div>
// output
;({
  fontSize: '7rem',
  lineHeight: '80%',
  letterSpacing: '-0.02em',
})

image

@ben-rogerson ben-rogerson mentioned this pull request Aug 26, 2020
6 tasks
@ben-rogerson ben-rogerson merged commit f6250b2 into master Aug 30, 2020
@ben-rogerson ben-rogerson deleted the feature/font-size-extended branch August 30, 2020 02:00
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.

1 participant