-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
CSS Generation Issue between v4.0.14 and v4.0.15 in TailwindCSS #17346
Comments
This seems to be a change by #17036, in particular #17036 (comment) |
I have reviewed the changelog and come to the same conclusion, but what steps can I take to fix it? |
How are you using the missing CSS variables in your project? |
Hey! Can you explain what is actually broken in your project? The goal of that change was to remove those variables if they weren’t being used, but if they are being used they should be preserved. |
Hi @adamwathan, I apologize for the confusion, but the issue actually came from a third-party plugin. Tailwind itself does not have this problem. If possible, I would like to understand how the variable generation works in In the image below, which is from the Tailwind CSS playground, even though Could you explain how this happens? Thank you for your help! |
@PruthviPraj00 Playground does use the ![]() Regarding the issue you have with a third-party plugin: Can you create a minimal reproduction so we can take a look? |
Hello @philipp-spiess, The third-party plugin is FlyonUI, which is a UI component library built with TailwindCSS. You can find the zip file attached below. |
Edit: the problem was the use of hello, We encounter the same issue where the font set with --font-sans is ignored. @import url('./assets/fonts/fonts.css') layer(base);
@import 'tailwindcss';
@config '../tailwind.config.js';
@theme {
--font-sans: 'Inter', var(--default-font-family);
/* ... */
}
/* ... */ And the font.css file imported in index.css: @font-face {
font-family: "Inter";
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("InterVariable.woff2") format("woff2");
}
@font-face {
font-family: "Inter";
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("InterVariable-Italic.woff2") format("woff2");
} Rolling back to 4.0.14 fixes the issue with the font applied correctly. |
@PruthviPraj00 Thanks for the reproduction! I pushed a fix for this onto |
Hello @philipp-spiess, Thank you for taking the time to fix it. |
I have encountered a discrepancy in the generated CSS between v4.0.14 and v4.0.15 of TailwindCSS. The issue lies in the generated CSS for custom properties (CSS variables). The following sections highlight the differences between the two versions.
CSS Generated in v4.0.14: not the complete file.
V4.0.14.md
Tailwindcss Package.json in node_module
CSS Generated in v4.0.15: not the complete file.
v4.0.15.md
tailwindcss Package json
Comparison Screenshots: On the left side is v4.0.14, and on the right side is v4.0.15.
Key Differences:
--default-font-family
--default-font-feature-settings
--default-font-variation-settings
--default-mono-font-family
--default-mono-font-feature-settings
--default-mono-font-variation-settings
The text was updated successfully, but these errors were encountered: