Hi, Iām trying to create a card with entities on the left and an icon on the right (cropped, I like it that way).
Iām not sure Iāve done it in the best way, for example I would like to increase the width of the left column to have only one line for each entity (now it wraps).
This is the first time I have used this and it is exactly what I was after.
I am using it for a card only to allow me to have two other cards side by side and it works a treat. The only issue I have is that one of the cards is not being centred vertically.
As you can see the right hand card is not centring. Can anyone suggest how I go about making the right card sit beautifully in the middle of the card.
I think youāll need to mess with the button-card itself, as far as I remember, it has a default aspect ratio set that will result in the behaviour youāre seeing.
Layout Card vs Grid card - I tried to replace my grid cards with layout card. Doing this i recognized that with the layout card compared to the grid card i have an small frame in the layout card
Layout Card
Grid Card
Question is now how could i get rid of this small frame. Compared with other cards the layout card has always this frame which makes them looking smaller compred to other card - This drives me mad.
As layout option i use:
grid-template-columns: 1fr 1fr
grid-template-rows: auto
margin: 0px
padding: 0px
Thanks, will check it out. Wondering how I can bypass the default aspect ratio and force height: 100% as I already tried " !important;"
Fingers crossed. Thx
Seeking help from layout-card experts =)
I did some searching in this thread but couldnāt find the solution Iām looking for.
Iām about to dig deeper in the css grid options but want to make sure Iām not overengineering thisā¦
Iād like my layout to behave like
ācustom:vertical-layoutā
max_cols: 3
width: 400
but once cards reach the bottom of the screen, automatically move to the next column
and overflow at the bottom of the last column if needed.
I can do this by manually adding custom:layout-break at the bottom of each column but in order to correctly manage screen estate, I want the layout break to happen automatically based on screen size. Examples:
Thanks for the pointer,
I made some progress (below)
I defined the vertical height of the viewport to ensure columns are finite.
everything works and makes sense but the cards flow horizontally so I need to find a way to specify āflex-direction: columnā or something equivalent.
Newbie coder so pretty sure my flex part is in the wrong spot or just plain incorrect so feel free to jump in.
found the equivalent of flex-direction for grid-layout:
āgrid-auto-flowā, thereās a nice writeup here:
but best I could do is below.
Guess Iām stuck with the obvious definition of a āgridā where it ends up aligning all items to same height on each columnā¦ would need each item in each column be directly underneath each other, and not lined upā¦
which seems to bring me back to the āvertical-layout optionāā¦
would just need to figure out a way to apply custom:layout-break based on viewport height.
I had the same annoying 4px margin issues. I have solved it by copying (directory: config/lovelace/www/community/lovelace-layout-card) layout-card.js to layout-card_rs.js.
Then edit layout-card_rs.js with an editor (File editor). Change ā4pxā or ā8pxā in every line with the word āmarginā to ā0pxā.
After that edit the file (directory: config/) and change the line ā- url: /hacsfiles/lovelace-layout-card/layout-card.jsā in ā- url: /hacsfiles/lovelace-layout-card/layout-card_rs.jsā.
Now you got rid of the annoying 4px margins and it wil not be updated anymore.
The two flow cards (Power Flow Now / Energy Flows (today)) are not aligned with the apexcharts-card.
Iām using following grid configuration:
layout:
grid-template-columns: 0em 74px 25% 42% 25% auto
grid-template-rows: grid-title-row-height auto auto
grid-gap: 0.1em
grid-template-areas: |
". . title title title ."
". nav line1 line1 line1 ."
". nav line2 line2 line2 ."
Where the two flow charts are in a horizontal-stack and the 3 gauges and apex are in a vertical-stack WITHIN that horizontal-stack
Can anyone point me in the right direction please ?