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
Should Tailwind's resolveConfig work properly in a custom plugin file while using Twin Macro?
Do custom plugins work generally?
For me resolveConfig doesn't work right now, but I wanted to ask in case I'm making some sort of mistake..!
My actual use-case is that I want to create a custom plugin to dynamically change all rem values to px, because I am making a widget that uses Shadow DOM (and therefore the base px size on the html node isn't known ahead of time).
I guess a third, bonus question would be:
Based on the answers to the above, how would you go about doing what I'm trying to achieve?
My plugin 'appears' to work (all rem values can be updated to px when I log the processed config object), but the issue is that my customised Tailwind config file isn't being included into my plugin (only the default Tailwind config), and possibly the rem values are still displayed (though that could be some other error, so I don't want to say that definitively at this point).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey!
I just wanted to confirm:
resolveConfig
work properly in a custom plugin file while using Twin Macro?For me
resolveConfig
doesn't work right now, but I wanted to ask in case I'm making some sort of mistake..!My actual use-case is that I want to create a custom plugin to dynamically change all
rem
values topx
, because I am making a widget that uses Shadow DOM (and therefore the base px size on the html node isn't known ahead of time).I guess a third, bonus question would be:
Based on the answers to the above, how would you go about doing what I'm trying to achieve?
My plugin 'appears' to work (all
rem
values can be updated topx
when I log the processed config object), but the issue is that my customised Tailwind config file isn't being included into my plugin (only the default Tailwind config), and possibly therem
values are still displayed (though that could be some other error, so I don't want to say that definitively at this point).Any pointers here would be awesome, thanks.
Beta Was this translation helpful? Give feedback.
All reactions