šŸ”¹ Card-mod - Super-charge your themes!

Over my cold dead body LOL.

That was the question I needed, thought about it and suddenly realised that this is a dashboard/view specific theme that I’ve bee adding it to and browser-mod popups are not subject to that. Moved it to my general theme and it works a charm, thanks for hanging in there with me.

1 Like

Hi,

I’m trying to reduce chart legend font-size of a statistics graph and history graph.

I want to target the .chart-legend class, but I didn’t come any further than this :

:host(.type-statistics-graph) statistics-chart  {
  background-color: #ff00ff !important; /*TEST*/
}

(sorry for asking here each time I have to make a mod… I read the doc again and again, but I definitively don’t get the syntax) :roll_eyes:

Update: see šŸ’” UI eXtension - Add CSS styles to (almost) any part of the Home Assistant UI

for the new UIX integration by @dcapslock as drop in replacement for card-mod plugin.

Read all about it at https://uix.lf.technology/ which is still a work in progress

3 Likes

I Like the Name " UI eXtension " :+1:

1 Like

Why is this preferable over card-mod? What are the advantages?

please follow the link and learn all about it, dont think it is appropriate here to discuss all of that

As well as not appropriate to proselytize users with tons of promises. You find yourself a new plugin - you are welcome to use it, but others will hopefully decide themselves.

Hi everyone; I hope this is the right place to post. I’ve been struggling with this for a while now and am about to pull my hair out!

How does one target the header in a sections views dashboard using card-mod? I’d rather not rely on using themes if possible.

The DOM tree for reference and the specific thing I’m actually trying to do is:

body>home-assistant>shadow-root>home-assistant-main>shadow-root>ha-drawer>partial-panel-resolver>ha-panel-lovelace>shadowroot>hui-root>shadowroot>div class=ā€œnarrowā€> hui-view-container>hui-view>hui-sections-view>shadowroot>div class=ā€œwrapperā€ > hui-view-header>shadow-root>div class=ā€œcontainerā€>div class=ā€œlayoutā€ >div class=ā€œbadgesā€ >hui-view-badges>shadow-root>ha-sortable>div class=ā€œbadgesā€

I’m happy if i can target any thing from the div class=ā€œbadgesā€ all the way up to hui-view-header. The goal is NOT to modify an individual badge but the container that the badges are in.

Where in my yaml tree would I need to put card-mod or mod-card?

<–here?
views:
<–here?
-type: sections
<–here?

somewhere else?

I know that if I put it at the level of an individual card it takes me to that card in the tree but the documentation regarding selecting dashboard level elements or sections is hard to parse through.

TIA!