Custom styling #320
Replies: 18 comments 102 replies
-
Hello, Any idea how to change background color of drop down menu? https://i.imgur.com/PKTuYlJ.png Thanks :) |
Beta Was this translation helpful? Give feedback.
-
Is it possible that you tell me stupid boy how to use it for more than one tile. I tried, but i failed... Thank you once again. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Hi! Is there any way to make the "map mode" dropdown open upwards? Like in the demo. I have removed icons and tiles. When clicking the map mode button, the dropdown opens downwards and does not fit in the ha card. Thanks Example.mov |
Beta Was this translation helpful? Give feedback.
-
Hi, I would like to remove the blue background: This is my config:
|
Beta Was this translation helpful? Give feedback.
-
for those want to change text color of "internal room" (tested on only viomise config)
|
Beta Was this translation helpful? Give feedback.
-
Hello, took me a while to understand why this is not working, in examples card-mod needs to be card_mod :) |
Beta Was this translation helpful? Give feedback.
-
@PiotrMachowski thanks for you great work! |
Beta Was this translation helpful? Give feedback.
-
Hi, How can I hide the zoom icons? I tried without success:
|
Beta Was this translation helpful? Give feedback.
-
Hi @PiotrMachowski , it looks like with the new update of HA (or card-mod maybe?!?) the configured colors are not applied any more (neither within the ha-card group nor the various .tile-wrapper ... are you experiencing the same? Is there a workaround? I am not noticing news in the card-mod documentation, do you have any idea? |
Beta Was this translation helpful? Give feedback.
-
entity: vacuum.roborock_s7
preset_name: Live Map
style: |
ha-card {
--map-card-room-outline-line-segment-gap: 0px;
--map-card-room-icon-background-color-selected: rgba(0, 165, 0, 0.5);
--map-card-room-outline-line-color: gray;
--map-card-room-outline-fill-color: rgba(192, 192, 192, 0.2);
--map-card-room-outline-line-color-selected: green;
--map-card-room-outline-fill-color-selected: rgba(0, 225, 0, 0.2);
--map-card-predefined-rectangle-icon-background-color-selected: rgba(0, 165, 0, 0.5);
--map-card-predefined-rectangle-line-segment-gap: 0px;
--map-card-predefined-rectangle-line-color: gray;
--map-card-predefined-rectangle-fill-color: rgba(192, 192, 192, 0.2);
--map-card-predefined-rectangle-line-color-selected: green;
--map-card-predefined-rectangle-fill-color-selected: rgba(0, 225, 0, 0.2);
}
:host
{% if (states("binary_sensor.roborock_s7_water_shortage")) | float(0) < 0 %}
.tile-wrapper:nth-child(8) {
border: 3px solid red;
}
.tile-wrapper:nth-child(8) > * > .tile-value {
color: red;
font-weight: bold;
icon: mdi:robot-vacuum;
}
{% endif %}
{% if (states("sensor.roborock_s7_sensor_dirty_left")) | float(0) < 0 %}
.tile-wrapper:nth-child(9) {
border: 3px solid red;
}
.tile-wrapper:nth-child(9) > * > .tile-value {
color: red;
font-weight: bold;
}
{% endif %}
{% if (states("sensor.roborock_s7_filter_left")) | float(0) < 0 %}
.tile-wrapper:nth-child(10) {
border: 3px solid red;
}
.tile-wrapper:nth-child(10) > * > .tile-value {
color: red;
font-weight: bold;
}
{% endif %}
.... Pretty much what you suggested at the top of this FAQ... |
Beta Was this translation helpful? Give feedback.
-
Hi, is there a way to hide the “status” tiles such as status, battery, fan speed etc. behind a “more info” button that could be toggled to expand a section with the tiles? I like to see the info every now and then, but most of the time feel like it clutters the dashboard too much. |
Beta Was this translation helpful? Give feedback.
-
Hi, is there a way to hide the room-label text? With using just the class room-label I wasn't able to achieve my goal. I'm thankful for any hint :) |
Beta Was this translation helpful? Give feedback.
-
Hi @PiotrMachowski! Great work! Thanks a lot! |
Beta Was this translation helpful? Give feedback.
-
Hi averyone! thanks to developer and comunity for this card! I have a few issues, first af all, and as some already mentioned i have problems with scale, if I scale it to the wide of the card (blue rectangle) it proportionaly scales and goes out and overlaps with another cards at the bottom, I tryed card-mod, but it crops the card and all the controls are invisible and you have to scroll the content, not a solution, also I tryed some div. map-wrapper scale or something like that with very veired results (I'm dump in CSS, just copy-paste knowledge ahaha) |
Beta Was this translation helpful? Give feedback.
-
I've been attempting to get some kind of outline or box around the room labels to help with readability in various situations as just a single color on the text itself doesn't always work. Unfortunately I don't know enough about CSS to do this on my own and I have yet to find any examples online that do this. Does anyone have any tips? |
Beta Was this translation helpful? Give feedback.
-
Hi. Can anyone suggest how this area background can be changed? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Basic
If you want to apply custom styling to card's elements you can do it in following ways:
Advanced
This card contains two types of CSS variables: "normal" and "internal":
--map-card-primary-color
,--map-card-internal-primary-color
.Normal variables are used to retrieve data from theme.
Internal variables are used in nested card's elements to provide appropriate styling - their values are calculated using normal variables.
If you want to style a specific card's element you have to use internal variable.
Setting individual room colors:
Changing tile color if value is negative
Beta Was this translation helpful? Give feedback.
All reactions