Tailwind breakpoints #215
Unanswered
Gachod-Pierre
asked this question in
Q&A
Replies: 1 comment
-
|
Hi Pierre—Thanks for posting this! There are a few things to cover here:
With that preamble, you should be able to do everything covered in the Responsive design page in the v4 docs without modification. If you find that not to be the case, please let me know! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm currently building a WordPress theme using underscore-tw (_tw), which relies on Tailwind v4 and the CSS-first API (@tailwind, @theme, @layer base).
Typography, colors, spacing, and other tokens defined inside @theme { ... } work perfectly.
However, I’m running into a major issue:
➡️ I cannot get Tailwind breakpoints to work in _tw.
@screen sm { ... } → error: “The screen 'sm' does not exist in your theme config.”
Declaring breakpoints inside @theme (e.g. --breakpoint-sm: 640px) does not work
Creating a tailwind.config.js with theme.screens is also ignored
_tw seems to compile Tailwind only through the @tailwindcss/postcss plugin, without loading the full Tailwind engine or config file
So my questions are:
Is there an official or recommended way to enable responsive utilities?
Or is responsive behavior intentionally unsupported in _tw?
Should we rely entirely on plain CSS @media queries instead of Tailwind @screen?
Any explanation or guidance on how _tw handles (or doesn’t handle) breakpoints would be really appreciated.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions