Skip to content

@layer base is used but no matching @tailwind base directive is present. #18123

Answered by RobinMalfait
hdransfeld asked this question in Help
Discussion options

You must be logged in to vote

The problem seems to stem from the fact that you are combining Tailwind CSS v3 and v4 at the same time.

You can rename the @layer base to something else if you split up the @import "tailwindcss"; import. https://tailwindcss.com/docs/preflight#disabling-preflight

E.g.:

@layer theme, custom-base, custom-components, custom-utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/preflight.css" layer(custom-base);
@import "tailwindcss/utilities.css" layer(custom-utilities);

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@RobinMalfait
Comment options

Answer selected by hdransfeld
@hdransfeld
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #18122 on May 23, 2025 09:58.