Skip to content

Trying to use tailwind v4 alongside bootstrap #17072

Answered by wongjn
Keith-Web3 asked this question in Help
Discussion options

You must be logged in to vote

The correct CSS would be:

@layer theme, base, components, utilities;

@import 'tailwindcss/theme.css' layer(theme) prefix(tw);
@import 'tailwindcss/utilities.css' layer(utilities);

To be clear, you'd also then need to add the prefix to all the Tailwind classes yourself in markup/templates:

-<h1 class="text-3xl font-bold underline">
+<h1 class="tw:text-3xl tw:font-bold tw:underline">

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Keith-Web3
Comment options

Answer selected by Keith-Web3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants