lovelace-layout-card icon indicating copy to clipboard operation
lovelace-layout-card copied to clipboard

justify-content: center

Open tieskuh opened this issue 2 years ago • 4 comments

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.

tieskuh avatar Nov 26 '22 18:11 tieskuh

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!

GoNzCiD avatar Dec 19 '22 12:12 GoNzCiD

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 …

Winor avatar Dec 19 '22 17:12 Winor

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!

tbrasser avatar Dec 23 '22 09:12 tbrasser

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

NoAdO avatar Feb 08 '24 07:02 NoAdO