Possible to declare theme variables on top of Raw Config? or use two theme files?

Hey everyone,

I am creating a new dashboard using this lovely theme:

(thanks to @Madalena for the great theme and constant updates.)

I want to tweak this theme, and add some of my own custom variables plus some card-mod classes.

How can i do this without messing with the theme files (as changes will be deleted in the next theme’s update)?

Say i want to add this: text-custom-color: red

Is there a way to add it to the top of my Raw Configuration editor?
Or can i create a second theme file (my-theme-variables.yaml) which would be “sideloaded” along with the metro theme files?

TiA

1 Like

Thanks for the compliments!

As far as I can tell, while !include does work for themes, YAML &anchors and *aliases do not. In order for what you are trying to happen, I will probably need to split the files on my end, so that they can almost act like libraries that you can !include to your own theme.

I have actually added a bunch of lines of code to your theme in order for it to work with my old dashboard (built mainly with custom button cards).

So every update you pushed I had to go and paste in my code :slight_smile:

Now I’m building a new one, and wanted to avoid this, so I’m trying to use as many of your variables as possible.

I use custom-button-cards templates for most of the code but at some point I have a conditional card that I want to style with card-mod so I want to be able to inject some stuff into the theme files.

Anyway, I can always keep pasting some lines at the end of your code I guess :slight_smile: