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

Help wanted - truncate "Name" field width #169

Closed
damyanor opened this issue Feb 9, 2021 · 4 comments
Closed

Help wanted - truncate "Name" field width #169

damyanor opened this issue Feb 9, 2021 · 4 comments

Comments

@damyanor
Copy link

damyanor commented Feb 9, 2021

Hi,
in reference to #134
I found that the name field can be cut by changing flex property of the .info class. Originally the value looks like this: flex: 1 0 30%; and it should be changed to ie. flex: 1 0 0%; However, I cannot set a proper path to override the style using card-mod plugin. Is this even possible? Here's the code of the example card (Firefox'es Inspector screenshot is better than the code itself I think to show the hierarchy):
flex

@ildar170975
Copy link

How to decrease a width of the "name" field (.info.pointer.text-content) by card-mod:
Before:

type: entities
entities:
  - type: 'custom:multiple-entity-row'
    entity: sun.sun
    entities:
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
    name: ''
    unit: ''
    icon: ''
    toggle: false
    show_state: false
    state_header: ''
    state_color: false

изображение

After:

  - type: 'custom:multiple-entity-row'
    style:
      hui-generic-entity-row:
        $: |
          .info.pointer {
            flex: 1 0 0%;
          }
    entity: sun.sun
    entities:
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
      - entity: sun.sun
        name: xxx
        styles:
          width: 60px
    name: ''
    unit: ''
    icon: ''
    toggle: false
    show_state: false
    state_header: ''
    state_color: false

изображение

I think that some time ago it was working properly, then it was changed, so we can see that some columns may be not visible...
Recently I realized this in my setup:
изображение
Note that the last column is not fully visible because these 3 columns were shifted to the right - they used to be located closer to the left border:
изображение
So now I have to manually correct the "flex" property by card-mod.

@damyanor
Copy link
Author

damyanor commented Mar 2, 2021

Works perfect! Thank you very much for your help.

@ildar170975
Copy link

I do not think that the issue must be "just closed".
The behaviour was changed recently.
The latest update of the multiple-entity-card was on November 2021; I noticed the difference recently; so the problem may be because of HA/browser/etc.
Now I have to open a new issue.

@damyanor
Copy link
Author

damyanor commented Mar 2, 2021

It's probably because of HA update, the root cause is described in #134 and the intention of this thread was to workaround the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants