-
Hi, I'm encountering an issue after upgrading to TailwindCSS 4. I've done some research but haven't found any satisfactory answers to the problem I'm facing. I'm using FontAwesome 6.x (https://docs.fontawesome.com/web/use-with/vue) with Vue.js. After the upgrade, I noticed that most of the styles applied to the svg/FontAwesomeIcon component are being overridden by FontAwesome's default styles. <font-awesome-icon
icon="chevron-right"
class="h-2 w-2 shrink-0 text-gray-600 dark:text-gray-300"
/> What are your thoughts on this issue? Do you see any straightforward solutions that could be implemented? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
It seems like you'd need to have the Tailwind utilities outside any cascade layer: -@import "tailwindcss";
+@layer theme, base, components, utilities;
+
+@import "tailwindcss/theme.css" layer(theme);
+@import "tailwindcss/preflight.css" layer(base);
+@import "tailwindcss/utilities.css"; |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue with my styles which worked fine with TW v3 but don't anymore with v4. Is there a recommended standard approach to how to handle this? I am using Next.js. |
Beta Was this translation helpful? Give feedback.
It seems like you'd need to have the Tailwind utilities outside any cascade layer: