v1.9.0
Layout model, label control, and CSS variable overrides
This release revises the card's internal layout model, adds more control over label rendering, and moves advanced styling toward namespaced css_vars overrides. The visible card behavior should remain familiar, but the layout now has a cleaner structure for compact cards, native themes, contained bars, clipping behavior, and Masonry sizing.
Added
- Added
clip_labelsto choose between always keeping labels readable and keeping bars at their exact proportional widths.- You can also configure an entity (for example an
input_boolean) that determines if clipping should occor or not (thanks to a suggestion by @khenderick in issue #23)
- You can also configure an entity (for example an
- Added
show_iconsto hide all icons inside rendered source, destination, shortfall, and surplus labels. - Added
css_varsfor card YAML, allowing--hnl-flow-bars-*CSS custom properties to be overridden withoutcard_mod. - Added visual-editor support for the new label and icon display options.
Improved
- Revised the entire flow-bar layout model: structural sizing, overflow handling, bar rows, accolade connectors, labels, and theme styling are now separated into dedicated scaffolding and visual CSS layers.
- Bar width allocation now preserves fractional percentages and assigns rounding residue to the final rendered segment, so visible bars and remainders fill the row more accurately.
- Bars hidden by
hide_zero_valuesno longer receive visual width. - The contained native theme now has corrected stacking/layout behavior.
- Internal style hooks are now namespaced under
--hnl-flow-bars-*, making theme overrides less likely to conflict with other cards. - The README now documents
clip_labels,show_icons,css_vars, available CSS variable keys, updated editor screenshots, and Masonry sizing guidance.
Changed
- Advanced CSS customization should now use
css_varsin the card config instead of relying oncard_mod. - The old
--min-bar-widthoverride documented for exact proportional widths has been replaced by the supportedclip_labelsoption. Existing manual overrides that targeted that old bar-width CSS hook should be removed or migrated toclip_labels: true.
Fixed
- Fixed spurious shortfall or surplus remainder bars caused by rounding artifacts when one side was already dominant.