Replies: 4 comments
-
I was able to hack something together for this
|
Beta Was this translation helpful? Give feedback.
-
I like where you're going with this, especially for a different success / error color combos, and including al the theme colors in this too, but as you pointed out it primarily works with the buttons, where as I could see it being useful for more than just buttons, but to have the backgrounds on anything able to be that color class selected, and have the borders, and text color within that element all readable. Heres a Codepen with the generated CSS from of all the color themes block, when I was just testing seeing what was generated. |
Beta Was this translation helpful? Give feedback.
-
I just updated the code snippet above, it includes --pico-primary-50 through --pico-primary-900 now and the rgb variants so you can adjust the transparency if you want. also, it changes the class to .pico-color-theme-[color] since .pico-color-[color] just sets color: to the primary from that palette in pico.colors for changing the background -- I like that Idea, I am doing something similar manually with the color variables in a couple of places. I was looking at how bootstrap does it -- and they use I don't really like that class name but maybe something similar? it could be something like invert but it uses the primary as background instead? then you could mix it with a theme to change it maybe? so maybe... maybe at that point the form valid vs invalid would just become an alias? |
Beta Was this translation helpful? Give feedback.
-
Here, I created a stackblitz with your fork and added the scss in with it https://stackblitz.com/edit/solidjs-templates-q6gppcc4?file=src%2FApp.tsx |
Beta Was this translation helpful? Give feedback.
-
I recently wanted to make success / error buttons and think it would be really useful to switch colors on the fly when using pico.colors.css
something like
.pico-color-red on a component -- and it updates all the css variables to change the theme to that color.
I was messing around with chatgpt and think I got an accurate jade color
Beta Was this translation helpful? Give feedback.
All reactions