Is it possible manually active breakpoint style? #3282
-
Tring to implement a window style react app, the window container is resizeable, want to use the tailwindcss for the responsive style, but active the style by the window div size, something like this <WindowContainer>
<div className="p-2 md:p-4 lg:p-8">
content
</div>
</WindowContainer> WindowContainer is resizeable, can change the class based on size. Is it possible to active the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey! Unfortunately, until "container queries" becomes a thing, it's pretty complicated to achieve what you're describing. The ResizeObserver API is something you can use, paired with the use of an |
Beta Was this translation helpful? Give feedback.
Hey!
Unfortunately, until "container queries" becomes a thing, it's pretty complicated to achieve what you're describing.
The ResizeObserver API is something you can use, paired with the use of an
iframe
, to achieve this.