Replies: 1 comment
-
To add a little more context, this is what I tried with the
This works for any markup that I isolate on each wrapper, but the CSS |
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
-
I know environment variables can in fact be read in
<head>/<body>
, but I'm looking to see if customglobalTypes
, like toolbar menu item values, could be read in there too.The use case I have is a theme switcher that needs to load 2 separate CSS static bundles based on the user's choice. Most ThemeSwitchers I've seen online used CSS-in-JS or Styled Components, that isn't my case. I've been provided with a branded theme and a white label theme as static CSS bundles, so I need to be able to import them conditionally.
I attempted doing this with a custom
decorator
but theimport
statements (for each CSS files) are always executed no matter what, which causes both bundles to be included at all times and the last one overrides the first one (if that makes sense).So, is this possible in the current version? If not, any alternatives? I tried
adddon-cssresources
but I don't think that's designed to inject 700KB worth of inline CSS.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions