Closed davehahn closed 1 year ago
The icons not respect the "--mdc-theme-primary:" style attribute. Color works for "--mdc-theme-primary" style attribute but not the other. this is the code:
type: custom:tabbed-card attributes: min_width: true styles: '--mdc-theme-primary': yellow '--mdc-tab-text-label-color-default': red tabs: - attributes: icon: mdi:view-dashboard card: ..... - attributes: label: 1 card: ......
This yeilds this with tab 1 (icon) active:
and this with tab 2 active:
Hope this helps. the css for an active tab looks like this
.mdc-tab--active .mdc-tab__icon { color: var(--mdc-theme-primary, #6200ee); }
and the non active tab looks like this
.mdc-tab:not(.mdc-tab--active) .mdc-tab__icon { color: var(--mdc-tab-color-default, rgba(0, 0, 0, 0.54)); }
So this may be an issue with mdc-tab, not sure but thought you should know.
Never mind, after reading the css, i added:
'--mdc-tab-color-default': red
global style attributes, and everything works good.
Cheers.
The icons not respect the "--mdc-theme-primary:" style attribute. Color works for "--mdc-theme-primary" style attribute but not the other. this is the code:
This yeilds this with tab 1 (icon) active:![Screen Shot 2022-10-14 at 5 08 22 PM](https://user-images.githubusercontent.com/1382101/195944234-17e809c0-aa93-4914-b202-ba5988d4ab09.png)
and this with tab 2 active:![Screen Shot 2022-10-14 at 5 09 13 PM](https://user-images.githubusercontent.com/1382101/195944321-c12b1d4c-64d1-4116-96c2-031d79fd6c5e.png)
Hope this helps. the css for an active tab looks like this
and the non active tab looks like this
So this may be an issue with mdc-tab, not sure but thought you should know.