Replies: 1 comment
-
An algorithm similar to this would be great: |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hey
Currently, changing the theme color in PicoCSS requires swapping out entire precompiled CSS files (e.g.,
pico.jade.min.css
,pico.blue.min.css
, etc.). This makes it difficult to change themes dynamically via JavaScript.What I’m trying to do:
I'm building a feature that randomly selects a Pico theme color on page load. I wrote this function:
Then in the HTML:
This works, but it requires loading a new CSS file per color, which is inefficient and harder to manage dynamically in client-side JS.
Suggestion:
It would be great if PicoCSS supported:
pico.base.css
)setPrimaryColor('#007bff')
)Benefits:
Thanks for the great work! PicoCSS is beautifully simple and clean. This feature would make it even more flexible for dynamic and JS-heavy apps.
Beta Was this translation helpful? Give feedback.
All reactions