HaCasa icon indicating copy to clipboard operation
HaCasa copied to clipboard

[ENHANCEMENT] [HaCasa] - Graph card not correct scaling mobile

Open ivicii opened this issue 8 months ago • 2 comments

Describe the current situation and the problem When putting 2 graph cards next to each other the value text is not scale correct.

See attached screenshot

Image

ivicii avatar Apr 19 '25 20:04 ivicii

Need to find out if I can make the text more responsive. It cuts the text off at 454px width.

Link with #73

damianeickhoff avatar Apr 22 '25 10:04 damianeickhoff

The font size can be made responsive with the clamp function: clamp(min, preferred, max). Min and max are optional. Example: - font-size: clamp(1.5rem, calc(2.0vw + 1rem), 4.0rem) So the minimum size will always be 1.5rem and the maximum will be 4rem. The preferred size, however, is calculated based on the viewport width, making the font size responsive.

coasting24 avatar Jun 02 '25 11:06 coasting24