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

Fix fontFamily config types #9214

Merged
merged 1 commit into from Aug 30, 2022
Merged

Fix fontFamily config types #9214

merged 1 commit into from Aug 30, 2022

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented Aug 30, 2022

Previously only the following format was permitted:

module.exports = {
  theme: {
    fontFamily: {
      sans: ['Inter', 'sans-serif'],
    },
  },
}

Now all of these formats are permitted:

module.exports = {
  theme: {
    fontFamily: {
      sans: ['Inter', 'sans-serif'],
      sans2: [['Inter', 'sans-serif'], { fontFeatureSettings: '"cv11"' }],
      serif: 'Times, serif',
      serif2: ['Times, serif', { fontFeatureSettings: '"cv11"' }].
    },
  },
}

References

Copy link
Contributor

@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.

Ah that makes sense. I forgot we could do just a string, and the font feature settings are fairly new right?

Thanks for updating these!

@bradlc bradlc merged commit bcf14b1 into master Aug 30, 2022
@bradlc bradlc deleted the font-family-types branch August 30, 2022 11:22
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.

None yet

2 participants