-
We would like to display tailwind components inside of a tailwindui uses iframes to do this, but we tested that approach and it breaks JavaScript libraries that access If we could dynamically adjust breakpoints, I think we could achieve the same interaction—simulating a narrower, dynamic window width. Is there any reasonable way to do this with this library? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
We accomplished this by adding diff --git a/node_modules/twin.macro/macro.js b/node_modules/twin.macro/macro.js
index 8b28d1d..8d1e40b 100644
--- a/node_modules/twin.macro/macro.js
+++ b/node_modules/twin.macro/macro.js
@@ -2690,6 +2690,14 @@ var variantConfig = function (ref) {
'group-hocus': function (variantData) { return prefixDarkLightModeClass('.group:hover &, .group:focus &', variantData); },
'group-active': function (variantData) { return prefixDarkLightModeClass('.group:active &', variantData); },
'group-visited': function (variantData) { return prefixDarkLightModeClass('.group:visited &', variantData); },
+
+ 'responsive-sm': function (variantData) { return prefixDarkLightModeClass('.responsive-sm &', variantData); },
+ 'responsive-md': function (variantData) { return prefixDarkLightModeClass('.responsive-md &', variantData); },
+ 'responsive-lg': function (variantData) { return prefixDarkLightModeClass('.responsive-lg &', variantData); },
+ 'responsive-xl': function (variantData) { return prefixDarkLightModeClass('.responsive-xl &', variantData); },
+ 'responsive-2xl': function (variantData) { return prefixDarkLightModeClass('.responsive-2xl &', variantData); },
+
// Media types
print: '@media print',
screen: '@media screen', |
Beta Was this translation helpful? Give feedback.
We accomplished this by adding
responsive-{sm,md,lg,xl,2xl}
variants totwin
, and manually setting these classes on the pseudo browser, to simulate dynamic responsiveness within a container: