question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Setting icon_color of entity to a CSS variable --primary-color (that is the primary theme color)

See original GitHub issue

Current Behavior

Setting the icon_color to a CSS variable --primary-color doesn’t work.

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: device_tracker.home_pc
    icon: mdi:desktop-classic
    icon_color: --primary-color
    content_info: name
    name: PC

Expected Behavior

Icon color is the value of CSS variable named --primary-color

Steps To Reproduce

No response

Environment

Home Assistant 2022.9.7
Supervisor 2022.09.3

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MeisterBobcommented, Oct 16, 2022

shouldn’t be var(--rgb-primary-color) the default value for icon_color instead of blue?

0reactions
gremocommented, Oct 3, 2022

Thank you A LOT!

Finally your cards can match my primary theme color 🥳

Immagine 2022-10-03 115208

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reference to theme's primary color instead of a specific color ...
Using ReactJS and MUI, I have a project in which I have changed the theme colors. const ...
Read more >
CSS variables incorrect in <hui-view> in the "dark" color mode
This shows that this bug is only present when the dark mode is selected regardless of theme configuration. 3 expected. Describe the behavior...
Read more >
Using CSS custom properties (variables) - MDN Web Docs
They are set using custom property notation (e.g., --main-color: black; ) and are accessed using the var() function (e.g., color: var(--main- ...
Read more >
Style or Change Default App Colors - Ionic Framework
Ionic has nine default colors that can be used to change the color of many components. Learn how to utilize Ionic CSS color...
Read more >
Theme Palette Colors - MudBlazor - Blazor Component Library
The CSS class is bound to the MudBlazor theme and updated if you change ... Below is a list of the Material design...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found