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

Add support for configuring default font-variation-settings for a font-family #10034

Closed
wants to merge 2 commits into from
Closed

Add support for configuring default font-variation-settings for a font-family #10034

wants to merge 2 commits into from

Conversation

ngrushkovsky
Copy link
Contributor

@ngrushkovsky ngrushkovsky commented Dec 9, 2022

I wanted to set default font-variation-settings for the beta version of Inter, which includes Inter Display as an optical size variation axis. However, I discovered that there is no support for this option in the current codebase.

In addition to existing support for font-feature-settings, this pull request adds support for configuring default font-variation-settings for a font-family. This will give users more control over how the fonts are rendered in their projects.

module.exports = {
  theme: {
    fontFamily: {
      sans: [
        'Inter var, sans-serif',
        {
          fontFeatureSettings: '"cv11", "ss01"',
          fontVariationSettings: '"opsz" 32',
        },
      ],
    },
  },
}

I decided not to open a feature request for this change as it may not be significant enough, and I hope that's okay. Thank you for considering this change, and for all the work you've done on this amazing framework! ❤

@adamwathan
Copy link
Member

Thanks I think this makes perfect sense to support! Need to prepare a documentation update before merging so will leave this open for now, but plan to merge once I have a chance to update the documentation. Trying to be better about not leaving myself a shit ton of documentation work to do right before a release comes out 😄

@adamwathan
Copy link
Member

@RobinMalfait do you mind rebasing and resolving the conflicts here and merging when you get a chance tomorrow? Will just do the documentation sometime before the v3.3 release — just need to make sure this is in the changelog so we don't forget 👍

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