thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.04k stars 169 forks source link

Border radius not applying to mod-card in panel mode #369

Open jeremynoesen opened 3 months ago

jeremynoesen commented 3 months ago

My Home Assistant version: 2024.4.0b3

My lovelace configuration method (GUI or yaml): GUI

What I am doing: Using a theme, I am applying a border radius to all cards in a panel view.

What I expected to happen: All cards should have said border radius.

What happened instead: Cards placed within a mod card do not have the border radius, and instead have a 0px border radius.

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error
# No border radius
views:
  - type: panel
    path: default
    icon: ''
    theme: test
    cards:
      - type: custom:mod-card
        card:
          type: vertical-stack
          cards:
            - type: button
              icon: mdi:ab-testing
            - type: button
              icon: mdi:ab-testing

# Border radius present
views:
  - type: panel
    path: default
    icon: ''
    theme: test
    cards:
      - type: vertical-stack
        cards:
          - type: button
            icon: mdi:ab-testing
          - type: button
            icon: mdi:ab-testing

# Theme
test:
  ha-card-border-radius: 28px
# End of code

Error messages from the browser console:


By putting an X in the boxes ([]) below, I indicate that I:

mcv93us commented 2 months ago

Same problem for me also with version 2024.4.1 of Home Assistant.

ildar170975 commented 2 months ago

2024.4.1 3.4.3

~What am I missing here?~

I see, this is related to the recent change in 2024.4 about "do not show round corners in panel mode". https://github.com/home-assistant/frontend/pull/20122 https://github.com/home-assistant/frontend/pull/20135 https://github.com/home-assistant/frontend/pull/20264

Suggest to mention "panel layout" in the issue's title.

e46lux commented 2 months ago

I've resolved mine with the following: lovelace-layout-card#284#issuecomment-2048424148