-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to bring their own styles #78
Comments
Hey, @NickyMeuleman! Can you let me know what you're imagining this experience to be like? |
I was thinking about an optional way to load a (local) .css file. This wouldn't replace the pre-defined themes, but be an optional way to provide CSS rules and supply additions/overrides. Not sure how that would work yet. But some possible implementation: The filereader API is pretty neat, I use it on https://nickymeuleman.netlify.app/aoc2021-solver/ to let someone "upload" their own input. #73 Would be the guide for users to provide their own style rules, how they know what to target. |
Gotcha — I thiiiiink this is already supported, through other routes. If you want to start with a theme and just tweak styles, OBS (and maybe OBS's descendants?) let you inject custom styles into your browser source. If you'd like to inject a whole dang stylesheet, the |
Nice! Didn't know that. Since using local CSS is possible via the tools you're likely to use showmy.chat with like OBS this is fine. Didn't test the web-hosted files yet. |
Here's an example of using Pico.css as an external, CDN-hosted stylesheet: |
There's a brief comment about this feature in the config docs — https://showmy.chat/docs/configuration/#theme — but it's easy to miss. I think this feature is very cool because not only does it mean folks can build their own themes without having to go through the contributor workflow, it also allows us to provide private themes for folks (and have them be responsible for hosting). |
It's awesome and was exactly what I was thinking of when I created this issue! |
Allow users to provide their own CSS.
That way they can either tweak a theme to their liking, or even use it to bring their own custom theme. (maybe this can be used to build custom themes on a base of #44)
This raises a few security questions.
It would mean executing CSS on the user's device.
While CSS is probably fine, executing any code that can be user-supplied warrants a closer look at how that is handled.
The text was updated successfully, but these errors were encountered: