thomasloven / lovelace-layout-card

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

horizontal-layout: unneeded scrollbar #261

Open ildar170975 opened 10 months ago

ildar170975 commented 10 months ago

My Home Assistant version: 2023.11.2

Layout-card version (FROM BROWSER CONSOLE): 2.4.4

What I am doing: Consider this code:

title: test-6
path: test-6
cards:
  - &ref_card
    type: entities
    entities:
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
  - *ref_card
  - *ref_card
  - *ref_card

which gives us this:

image

Now let's add a horizontal layout:

title: test-6
path: test-6
type: custom:horizontal-layout
cards:
  ...

I see an unneeded scrollbar on the right:

image

What I expected to happen: A scrollbar here is not needed - so it is not supposed to be shown.

What happened instead: A scrollbar is displayed.

Error messages from the browser console: none


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

ildar170975 commented 10 months ago

Same with vertical-layout:

title: test-6
path: test-6
type: custom:vertical-layout
cards:
  - &ref_card
    type: entities
    entities:
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
      - sun.sun
  - type: custom:layout-break
  - *ref_card
  - type: custom:layout-break
  - *ref_card
  - type: custom:layout-break
  - *ref_card
ildar170975 commented 10 months ago

Managed to get rid of the scrollbar:

image

Not sure but may be a code is here: https://github.com/thomasloven/lovelace-layout-card/blob/b63bf93daf166609ededbafc7b31a6e5d88037c3/src/layouts/base-column-layout.ts#L100

thomaswwp commented 9 months ago

I too have this issue which ruins the look of my kiosk panel. I am not experienced enough how to take what you have said above and make the same change. :(

Tratos-1 commented 8 months ago

The same issue here. This helped me in the configuration yaml.

type: custom:horizontal-layout
layout:
  height: auto
ildar170975 commented 8 months ago

helped me

Confirmed.

travisterrell commented 7 months ago

The same issue here. This helped me in the configuration yaml.

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

Thanks; I just threw it in the layout section for the entire dashboard. Worked like a charm.