thomasloven / lovelace-layout-card

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

justify-content: center #224

Open tieskuh opened 1 year ago

tieskuh commented 1 year ago

In the code "justify-content: stretch" is hardcoded. I would like to set that to "center". Is is possible to make that a variable?

image

If possible I would also like to give that same #root element a max-width.

GoNzCiD commented 1 year ago

I'm just going to report this issue....

From my POV, using grid layout, it should be possible to use the justify-content attribute, as described in the documentation, but it isn't exported to the rendered page.

By adding it manually in the browser dev tools at element level, it works, so it seems that it's not translated despite you declare it in the design. imagen

Very pleasant if fixed!

Winor commented 1 year ago

Temporary workaround using card mod to change justify-content:

type: custom:mod-card
card_mod:
  style:
    layout-card $ grid-layout $: |
      #root {
        justify-content: center !important; 
      }
card:
  type: custom:layout-card

Dirty, but it works …

tbrasser commented 1 year ago

Lol this leaves me using mod_card on all my top-level cards in my views, uglyness all around 😂. Thanks for the pointer on how to apply card-mod to the layout card container, I need different heights depending on mediaquery, this'll let me do it!

NoAdO commented 7 months ago

Wow, that's exact what i need! Looks like this repo is abadoned.