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

Separator - Line length and spacing #614

Open
Shasdo opened this issue Jul 3, 2024 · 1 comment
Open

Separator - Line length and spacing #614

Shasdo opened this issue Jul 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Shasdo
Copy link

Shasdo commented Jul 3, 2024

Describe the bug
The separator line doesn't end with the right spacing when sub buttons are added.
The space gets longer with each sub-buttons added
The two purple line are the same length and are there to illustrate the uneven spacing.
image

Also the space after the text and before the subbutton is a bit longer to my taste, is there a styling option to change it ?

Subsidiary question: (can make another issue)
why "normal" card layout doesn't reduce the height of the cell used by each bubble card ?
Is it a fixed minimal height linked to the LoveLace frontend ?
If there is a another card type above the separaror, it results in an unven vertical spacing.
Could the Bubble Card be vertically centered in each cell (with styling ?) ?

image

Thank you for your great work !

Expected behavior
The divider should be closer to the sub-buttons

YAML
If applicable, add any relevant YAML code.

  - type: sections
    max_columns: 2
    sections:
      - type: grid
        cards:
          - type: custom:bubble-card
            card_type: separator
            name: Test 1
            sub_button:
              - icon: mdi:numeric-1
            styles: |2-
                .bubble-line {
                  background: red ;
                  opacity: 1;
                }
                .bubble-sub-button-1 {
                  background-color: grey !important;
                }
                .bubble-sub-button-2 {
                  background-color: grey !important;
                }
                .bubble-sub-button-3 {
                  background-color: grey !important;
                }
          - type: custom:bubble-card
            card_type: separator
            name: Test 2
            sub_button:
              - icon: mdi:numeric-1
              - icon: mdi:numeric-2
            styles: |2-
                .bubble-line {
                  background: red ;
                  opacity: 1;
                }
                .bubble-sub-button-1 {
                  background-color: grey !important;
                }
                .bubble-sub-button-2 {
                  background-color: grey !important;
                }
                .bubble-sub-button-3 {
                  background-color: grey !important;
                }
          - type: custom:bubble-card
            card_type: separator
            name: Test 3
            sub_button:
              - icon: mdi:numeric-1
              - icon: mdi:numeric-2
              - icon: mdi:numeric-3
            styles: |2-
                .bubble-line {
                  background: red ;
                  opacity: 1;
                }
                .bubble-sub-button-1 {
                  background-color: grey !important;
                }
                .bubble-sub-button-2 {
                  background-color: grey !important;
                }
                .bubble-sub-button-3 {
                  background-color: grey !important;
                }

Informations (please complete the following information):

  • Browser/App: Firefox
  • Bubble Card version: 2.0.4
  • Home Assistant version: 2024.6.4
@Shasdo Shasdo added the bug Something isn't working label Jul 3, 2024
@arthanoss
Copy link

As for the second question, the section layout in HA defines a fixed row height for cards inside it to keep everything even in a grid.

There's a section optimized layout available for separators (and buttons too) in Bubble Card and it does exactly what you want, it vertically aligns the separator in the middle of a row.

type: custom:bubble-card
card_type: separator
name: Separator
card_layout: large

Layouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants