Dynamic global stylesheet (CSS theming) #706
Unanswered
michaelByrne
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My app (a messageboard) has or will have a theming feature. Users will be able to set the colors etc. What I've built works by loading the themes from a database, converting them into maps, and using Go's native text templating to generate stylesheets. I'd hoped to just be able to inject them into a <style> element in the element of the app, like this:
But that doesn't work ofc. I'm wondering what the best alternative would be. CSS components don't seem like a great alternative because I'm talking about things like this:
Also important to note is that all of the HTML is already written with styles attached in the conventional way, which makes it extra difficult to imagine CSS components working well.
Beta Was this translation helpful? Give feedback.
All reactions