Skip to content

v1.9.0

Choose a tag to compare

@c-kick c-kick released this 26 May 15:11

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_labels to 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)
  • Added show_icons to hide all icons inside rendered source, destination, shortfall, and surplus labels.
  • Added css_vars for card YAML, allowing --hnl-flow-bars-* CSS custom properties to be overridden without card_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_values no 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_vars in the card config instead of relying on card_mod.
  • The old --min-bar-width override documented for exact proportional widths has been replaced by the supported clip_labels option. Existing manual overrides that targeted that old bar-width CSS hook should be removed or migrated to clip_labels: true.

Fixed

  • Fixed spurious shortfall or surplus remainder bars caused by rounding artifacts when one side was already dominant.