defining custom colour palette via CSS #29
mousemat86
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey hope you're well – loving the recent theme updates.
I'm attempting to add some custom colour palettes which can be defined as variables for some custom button cards, idea being they'll change on light versus dark mode during the day.
Rather than add them into the theme each time it updates I'm trying to define them globally in a CSS file added as a resource.
CSS file added to
/hacsfiles/material-colours/material-v1.css
:Adding the variable to my button cards as follows:
I don't know if this is theme specific or more of a CSS related thing but currently the cards are only showing in 'dark' despite setting the 'light' version of theme.
Could any one shed some light on where I might be going wrong?
Edit: So actually this is working as it should however it's setting light and dark based on the device. I guess my question is can this approach be used when setting 'mode' to light or dark. What would the selector need to be?
Beta Was this translation helpful? Give feedback.
All reactions