Add ability for custom breakpoints to be defined by a css variable #18283
michal-skoula
started this conversation in
Ideas
Replies: 2 comments
-
Hey! Can use the https://play.tailwindcss.com/xx9NuQYSBr?file=css ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh I didn't know this feature existed, thank you! |
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.
-
Normally CSS doesn't allow you to use a css variable inside of a media query:
This only works with preprocessors.
But when i define a breakpoint in my theme:
Tailwind simply "passes" the value from the css variable into the custom one, which won't work because CSS doesn't allow it.

I think it would be a really nice quality of life feature for tailwind to compile the css variable into a string like
40rem
or640px
so that the media query still works.P.S.: Apologies if my contribution is not following conventions, it's my first time contributing 😅
Beta Was this translation helpful? Give feedback.
All reactions