Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align in the same way than standard row #64

Closed
McGiverGim opened this issue Mar 30, 2020 · 4 comments
Closed

Align in the same way than standard row #64

McGiverGim opened this issue Mar 30, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@McGiverGim
Copy link

Hi! Thanks for your work!!

I have observed that the "standard" entity has different alignment than multiple-entity-row:

image

Can it be aligned in the same way to make easier merge both type of elements? Using the multiple-entity-row for all of the elements fixes the issue, but it wastes the space on the right and I think is better to be aligned with the base.

@benct
Copy link
Owner

benct commented Mar 30, 2020

This happens when the state content is too narrow, as the element has min-width: 45px. This is actually to fix alignment of additional entities on the row, but I guess there is room for improvement on that behaviour. I'll have a look at what can be done.

@benct benct added the enhancement New feature or request label Mar 30, 2020
@mycanaletto
Copy link

+1
image

@michaelarnauts
Copy link

@mycanaletto

Use https://github.com/thomasloven/lovelace-card-mod and apply this style. You will need to experiment with the correct amount of pixels.

    style: |
      .entity {
        min-width: 35px;
      }

If you want to style individual columns, you can use the following. It seems nth-child(2) is the first "column".

    style: |
      .entity:nth-child(2) {
        min-width: 35px;
      }
      .entity:nth-child(3) {
        min-width: 45px;
      }
      .entity:nth-child(4) {
        min-width: 25px;
      }

@FredericMa
Copy link

Hi @michaelarnauts
I'm trying to accomplish the same thing but applying the style doesn't do anything. So probably I'm applying it at the wrong spot.
Do you have an example where to put the style in the card?

benct added a commit that referenced this issue Oct 7, 2020
@benct benct closed this as completed Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants