BETA releases
Card-mod 4.0.0 will progress through a beta program so you can try out the updates, but at the same time we can make sure that 4.0.0 is ready for widespread release. Depending on your setup, you may need to revert to 3.4.5 until issues with the beta are fixed.
Thanks to @Mariusthvdb, LiQuid_cOOled, @ildar170975 who have taken part testing 4.0.0 during an alpha phase. Due to this thorough testing we are confident that most major issues have surfaced and been worked through. However this is not a guarantee hence the need for a beta program.
IMPORTANT: Upgrading when using Frontend module.
If you use Frontend module, as described HERE (instructions updated for v4) you will need to make sure that your Frontend resource module matches the Dashboard resources URL EXACTLY. v4 has an updated mechanism to prevent duplicate patching, but your Frontend resource module will not be up to date and your Browser may run old code. You can tell if this is your scenario as you will likely have console errors about missing functions. Future v4 upgrades should not error, but you should always update your Frontend module URL after upgrading via HACS.
BREAKING
Due to the change from patching <hui-card>
in preference of <ha-card>
there may be some changes required to your card_mod targets and/or styles as the class will now be on the card element (child of <hui-card>
) rather than <ha-card>
. Foe example, if you have targeted your CSS style rule to ha-card.myClass { ... }
, the best direct change is to use :host(.myClass) { ... }
.
Support for any migration of existing config due to changes in 4.0.0 will be managed through the Community Forum threads. Any such issue raised in GitHub will be closed and you will be directed to one of the community threads. This is to make sure that card_mod maintainers can focus on issues that require a fix in code, rather than just assisting users in the migration.
- GENERAL: https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/
- THEMES: https://community.home-assistant.io/t/card-mod-super-charge-your-themes/
What's Changed
- card-mod now prefers styling via parent
<hui-card>
which is the wrapper for the majority of standard Home Assistant cards.<ha-card>
is still supported as a secondary styling parent where<hui-card>
is not the parent of the element containing<ha-card>
. The implementation of this change should reduce substantially the need formod-card
as a card wrapper. - card-mod now supported for badges
<hui-badge>
- Cancel searching for and styling child elements when parent element is disconnected from DOM. This will give varying performance improvements, especially when switching views.
- Manage patch state at window level. This prevents duplicate patching fixing various issues when card-mod is loaded twice.
- Support styling strategy (
strategy:
) and grid sections (type: grid
) in dashboard views. - Support card-mod theming in config panels, developer tools, custom panels and element
<ha-app-top-bar-fixed>
. Theme variables arecard-mod-config
,card-mod-panel-custom
andcard-mod-top-app-bar-fixed
. NOTE: iFrame custom panels, include HASS Addons and HACS are not supported - README.md: Add HACS install link
Fixes
- README.md: Better
frontend_module_url:
instructions in performance section
New Contributors
Thank you to the contributions from
Full Changelog: v3.4.5...v4.0.0-beta.1