Access default variables after 4.0.5 #16375
-
Since #16211 is out in 4.0.5, one of my components is broken, and there doesn't seem to be a workaround. Let me explain. I'm using a Svelte component I created to display in the corner of the screen the current screen size and the matching Tailwind breakpoint, during development. I'm also displaying a dropdown menu that uses screen sizes exposed by Tailwind to show all the user-defined and default screen sizes. In v3, I just had to use the good old In v4 (4.0.0-4.0.4), I now use client-side computed CSS, as recommended per the docs, to get all the screens. Is there a way to get around my issue in 4.0.5? If not, I can see the following options:
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can tag the -@import "tailwindcss";
+@layer theme, base, components, utilites;
+
+@import "tailwindcss/theme" layer(theme) theme(static);
+@import "tailwindcss/preflight" layer(base);
+@import "tailwindcss/utilities" layer(utilities); |
Beta Was this translation helpful? Give feedback.
You can tag the
tailwindcss/theme
import withtheme(static)
like: