You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Tailwind throws a warning if you use @tailwind anywhere other than at the root of the stylesheet. This shouldn't be the case if just nesting inside of a native @layer at-rule — no reason for us to disallow that as it works totally fine 👍
Currently Tailwind throws a warning if you use
@tailwind
anywhere other than at the root of the stylesheet. This shouldn't be the case if just nesting inside of a native@layer
at-rule — no reason for us to disallow that as it works totally fine 👍Relevant code we'll need to look at is here:
https://github.com/tailwindlabs/tailwindcss/blob/master/src/lib/detectNesting.js#L8
Discussed in #10198
Originally posted by yevgeniy-belov December 31, 2022
Im trying to use the new CSS Cascade Layers like this:
@layer tw-base, tw-components, tw-utilities;
@layer tw-base { @tailwind base }
@layer tw-components { @tailwind components }
@layer tw-utilities { @tailwind utilities }
and Im getting the warning below:
[vite:css] Nested @tailwind rules were detected, but are not supported.
Is there a way to get rid of this warning?
Here is the the reproduction:
repo: https://github.com/yevgeniy-belov/vite-react-tw-nesting
codespaces: https://yevgeniy-belov-reimagined-engine-xrjg6pq6wq2vx96.github.dev/
The text was updated successfully, but these errors were encountered: