Anyone had any luck setting themes

Anyone had any luck setting themes according to the docs? https://solara.dev/documentation/components/lab/theming
11 Replies
iisakkirotko
iisakkirotko2mo ago
I'm guessing you mean setting the "info" and "error" colours in the example? What part are you stuck on?
Elder Millenial
Elder MillenialOP2mo ago
All of it. Changing values for the theme doesn't work. I had to just change the style on different components.
iisakkirotko
iisakkirotko2mo ago
That's interesting... Do you have some code I can take a look at?
Elder Millenial
Elder MillenialOP2mo ago
The example on the website doesn't even work for me. I tried 3 different browsers just to make sure.
iisakkirotko
iisakkirotko2mo ago
Hmm. Are you using dark mode? I should make it more explicit in the example as well, but setting theme.themes.light.info of course only affects the light mode.
Elder Millenial
Elder MillenialOP2mo ago
Using light mode Ah, so the reason the example wasn't working was because I did have it set to dark mode Oops I was using light mode in my example and it wasn't working though Hm... I'll do some debugging and come back to see if I can figure it out
iisakkirotko
iisakkirotko2mo ago
Yeah, I was confused by the same thing this morning when you first brought this up :D
Elder Millenial
Elder MillenialOP2mo ago
Welp, that's some good debugging haha
iisakkirotko
iisakkirotko2mo ago
I opened #956 to not be confused by it again
Monty Python
Monty Python2mo ago
iisakkirotko
<:pull_open:882464248721182842> [widgetti/solara] docs: emphasize having to set both theme variants for theme colors
All Submissions: - ✅ I installed pre-commit prior to committing my changes (see development setup docs). - ✅ My commit messages conform to conventional commits. - ✅ My PR title conforms to conventional commits. - ✅ I linked to any relevant issues. Description of changes Resulted in some confusion for me as to why the color change wasn't working when in dark theme
Created
iisakkirotko
iisakkirotko2mo ago
Let me know how it goes! Always happy to look at some code to help

Did you find this page helpful?