thomasloven / lovelace-layout-card

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

Extra space left and right #268

Open RobertoCravallo opened 10 months ago

RobertoCravallo commented 10 months ago

My Home Assistant version: 2024.1.3

Layout-card version (2.4.4):

What I am doing: Creating a layout

What I expected to happen: show 4 entities

What happened instead: I am using MUSHROOM and the cards are filled without spaces on the left or right. So it looks kind of strange, as there is no clear vertical line, see picture. 4 entities are shown, but there are extra spaces left and right. The entities should line up with the editor below & above.

Minimal steps to reproduce: Just use the layout-card

# The least ammount of code possible to reproduce my error

# End of code

Error messages from the browser console:


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

Nick2253 commented 8 months ago

I've run into the same problem, and it's because the default card-margin setting for layout-card is not 0px.

If you are using a column-based layout, then you should just be able to add card-margin: 0px to your card config under the layout option and it will fix it.

If you are using a grid-based layout, then card-margin isn't supported (see issue #137), so you can get around that by using margin: -4px.