bramkragten / swipe-card

Card that allows you to swipe throught multiple cards for Home Assistant Lovelace
234 stars 32 forks source link

Content cards doesn't get fit to swipe card's size #76

Open panhans opened 1 year ago

panhans commented 1 year ago

Hello,

I don't know if I am missing somthing, maybe an option. But when I put a swipe-card inside a grid the inner cards don't get fit to the swipe card size.

Expected (without swipe card): Bildschirmfoto 2023-06-16 um 12 53 50

How it looks (with swipe card - the size of swiper-card is all the way to the grid but not its child cards): Bildschirmfoto 2023-06-16 um 08 55 42

b4dpxl commented 1 year ago

I've been seeing similar things since updating to HA 2023.6:

image

In this case the second row in the screenshot above is a horizontal-stack inside a swipe-card, and it's too wide. All the items should be the same width in the screenshot. I've got the same behaviour with grid instead of stack. The first row isn't a swipe.

Inspecting the source in the browser, the stack is defaulting to 492px wide, regardless of the screen resolution:

image

Switching dashboards is sometimes enough to make it resize to fit, but not always. I have tried applying card_width but that doesn't seem to apply. Using parameters -> width applies, but that's a static width.

Gavergracht commented 2 months ago

is there a solution for the problem ?