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

Does not inform inner stack about a Panel mode #470

Open
ildar170975 opened this issue Oct 15, 2024 · 0 comments
Open

Does not inform inner stack about a Panel mode #470

ildar170975 opened this issue Oct 15, 2024 · 0 comments

Comments

@ildar170975
Copy link

ildar170975 commented Oct 15, 2024

In Panel mode, stock cards (vertical-stack, horizontal-stack, grid) use a "ispanel" property to style themself properly.
For instance, this defines processing of borders & box-shadows:
https://github.com/home-assistant/frontend/blob/79ac2a72fa39636e628b10b7bd04dad7a4b59a15/src/panels/lovelace/cards/hui-stack-card.ts#L109

      :host([ispanel]) #root {
        --ha-card-border-radius: var(--restore-card-border-radius);
        --ha-card-border-width: var(--restore-card-border-width);
        --ha-card-box-shadow: var(--restore-card-border-shadow);
      }

When auto-entities is used with stacks in a Panel mode - it causes absence of borders.
Consider these 2 cards:
-- grid with auto-entities
-- grid

type: custom:auto-entities
card:
  type: grid
  square: false
  columns: 2
card_param: cards
filter:
  include:
    - &ref_card_1
      entity_id: sun.sun
      options:
        type: entity
        entity: this.entity_id
    - *ref_card_1
    - *ref_card_1
    - *ref_card_1
type: grid
square: false
columns: 2
cards:
  - &ref_card_2
    type: entity
    entity: sun.sun
  - *ref_card_2
  - *ref_card_2
  - *ref_card_2

Both cards properly shown in a masonry layout:
image

The 1s card (with auto-entities) in Panel mode - no borders are shown:
image

The 2nd card in Panel mode - borders are shown:
image

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

1 participant