[v4.1.4] Keyframes are not generated for the second config #17709
-
What version of Tailwind CSS are you using? For example: v4.1.4 What build tool (or framework if it abstracts the build tool) are you using? Vite 6.0.1 What version of Node.js are you using? v20.18.1 What browser are you using? latest Chrome What operating system are you using? latest macOS Reproduction URL
Describe your issue Keyframes are not generated for animations in 'secondary' config, the animation class itself is present. We have a case when we're slowly migrating from one design system with old set of tokens to the new one and for this we have 2 tailwind configs where the second one is scoped under a class by |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Keyframes are sort of theme variables. That means there needs to be somewhere for them to be output. It seems like Tailwind uses the first tailwindcss/packages/tailwindcss/src/index.ts Lines 583 to 601 in adcf1de You can import +@layer theme, base, components, utilities;
+
+@import 'tailwindcss/theme' layer(theme);
@import 'tailwindcss/utilities' layer(utilities); Then, you can reset the default theme if you were omitting it because you didn't want to use Tailwind's default theme: @layer theme, base, components, utilities;
@import 'tailwindcss/theme' layer(theme);
@import 'tailwindcss/utilities' layer(utilities);
+@theme {
+ --*: initial;
+}
+
@config '../../tailwind.new-design.config.js'; |
Beta Was this translation helpful? Give feedback.
Keyframes are sort of theme variables. That means there needs to be somewhere for them to be output. It seems like Tailwind uses the first
@theme
rule as an indicator to output the@keyframes
rules:tailwindcss/packages/tailwindcss/src/index.ts
Lines 583 to 601 in adcf1de