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

The sans font family is incorrectly generated on the html rule when using fontFeatureSettings #9666

Closed
xt0rted opened this issue Oct 26, 2022 · 1 comment · Fixed by #9706 or #9707
Closed
Assignees

Comments

@xt0rted
Copy link

xt0rted commented Oct 26, 2022

What version of Tailwind CSS are you using?

3.2.1

What build tool (or framework if it abstracts the build tool) are you using?

What version of Node.js are you using?

  • 18.12.0
  • 19.0.0

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/IOqcJC9U7G

Describe your issue

If you try to use fontFeatureSettings on the sans font family then the value added to the html rule results in the following which places Inter at the end of the list instead of the beginning, and instead of font-feature-settings you get [object Object] at the very end of the font list:

html {
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji", Inter, [object Object];
}

.font-sans {
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji", Inter, [object Object];
}

If you adjust the font family to be a string instead of string array then the font-family is correctly set on the html rule, but there's no font-feature-settings. The .font-sans rule does include the extra settings though.

This issue does not seem to happen with a custom font family class such as the .font-inter version in the example.

@bradlc
Copy link
Contributor

bradlc commented Nov 1, 2022

Hey @xt0rted, thanks for reporting this! The issue is now resolved and will be included in the next stable release. In the meantime you may use the insiders release which already contains the fix: npm install tailwindcss@insiders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants