thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.06k stars 125 forks source link

Needless scrollbar in vertical layout #190

Open DuckyCrayfish opened 2 years ago

DuckyCrayfish commented 2 years ago

My Home Assistant version: 2022.3.7
Layout-card version: 2.4.2

What I am doing:

Using the vertical layout in a dashboard forces the dashboard to have some scrollable space, even if the layout itself is smaller than the vertical height of the window. I have narrowed the issue down to this CSS style:

https://github.com/thomasloven/lovelace-layout-card/blob/466df9cb051033881106dfb9029672ac7ea2a2c3/src/layouts/base-column-layout.ts#L230

Disabling this style in Chrome Inspector fixes this issue.

Minimal steps to reproduce:


By putting an X in the boxes ([X]) below, I indicate that I:

Aasikki commented 2 years ago

Can confirm I have this as well. Very annoying on as I'm using this on my smart mirror so it's extra distracting.

DirtyOptics commented 2 years ago

Any quick fixes for this? Also annoying the cr@p out of me.

casewalker commented 1 year ago

I think I just got the quick fix!

As @DuckyCrayfish points out, the height is defaulting to 100% when it should be defaulting to auto. The layout configs should be able to override this though, here is my config (note I am using horizontal layout):

type: custom:horizontal-layout
layout:
  height: auto

Edit: @deeeblack and @Aasikki heads up, please give this a try if you need a quick fix!

DuckyCrayfish commented 1 year ago

Ohh that's wonderful, I hadn't realized that the height attribute is customizable in yaml. Thanks a ton.

jack5mikemotown commented 1 year ago

i just randomly experienced this issue when i had not had it before. this happened when i was editing the options for a completely different view, also using the layout card. i...was ready to say that this cause caused by the columns element, as i had noticed a height of 1 less than the parent, yet margins of 3px, causing the overflow, yet not looking at it again, I no longer see that, and am unsure what is causing this or honestly really what is going on at all