Skip to content

v0.22.4 - Zero Bottom Spacing

Choose a tag to compare

@foXaCe foXaCe released this 21 Oct 05:29

🎯 Perfect Layout Fix

This release completely eliminates the unwanted bottom spacing issue by rewriting the entire padding system from scratch.

✨ What's Fixed

  • Zero bottom spacing: Graph now extends perfectly to the bottom edge
  • No more pixel gaps: Eliminated all sources of unwanted spacing
  • Clean padding logic: Completely rewritten padding system
  • Pixel-perfect rendering: Graph fills exactly the available space

πŸ”§ Technical Overhaul

Before

  • Multiple overlapping paddings creating confusion
  • Fixed heights causing empty space
  • Padding-bottom rules conflicting with each other

After

  • Clean, targeted padding system
  • Only top padding on first child
  • Only bottom padding on non-graph elements
  • Graph container has lateral padding only
  • Legend has top padding only for separation
  • Zero padding at card bottom

New Padding Architecture

ha-card (padding: 0)
β”œβ”€ div:first-child β†’ padding-top: 16px
β”œβ”€ div:not(:has(.graph)) β†’ padding-bottom: 16px
└─ div:has(.graph) β†’ padding: 0 16px (lateral only, flex: 1)
   └─ .graph (flex: 1, fills remaining space)
      β”œβ”€ .graph__container (fills vertically)
      └─ .graph__legend (padding-top only)

πŸ“Š Result

  • Graph extends to absolute bottom of card
  • No wasted vertical space
  • Perfect adaptation to Home Assistant grid
  • Consistent rendering across all screen sizes

πŸ› Fixes

  • Fixed persistent bottom spacing issue
  • Eliminated all padding conflicts
  • Removed overlapping CSS rules
  • Clean separation of layout concerns