kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.85k stars 231 forks source link

Border when embedded since 2022.11.0 (borders are not handled by "group: true") #883

Open julienlarivee opened 1 year ago

julienlarivee commented 1 year ago

When the card is embedded in an entities card, there is a border around the mini graph card. Before HA 2022.11.0, there was no border. image

type: entities
entities:
  - entity: climate.thermostat_cuisine
    icon: mdi:thermostat
    name: Cuisine
    group: true
    type: custom:mini-climate
  - type: custom:mini-graph-card
    group: true
    entities:
      - entity: sensor.temperature_cuisine
        name: Température

If we look at the same entities, but with native HA cards, there is still no border in 2022.11.0 image

type: entities
entities:
  - entity: climate.thermostat_cuisine
  - entity: sensor.temperature_cuisine

Also, the time picker card had the same issue, but they fixed it. Here is the link to it if it can help: https://github.com/GeorgeSG/lovelace-time-picker-card/issues/43

ildar170975 commented 1 year ago

@jlsjonas Probably this change must be made in https://github.com/kalkih/mini-graph-card/blob/master/src/style.js:

  ha-card[group] {
    box-shadow: none;
    border: none; ## !!!!!!!!!!!!!!!!!!!!!!!
    padding: 0;
  }

Till now only a shadow is set to none for a "grouped" card; now suggest to set border: none too. P.S. box-shadow: none; should NOT be removed.

jlsjonas commented 1 year ago

Hi, this is due to a change in HA's card styling, will update our card ASAP to support borderless embeds (likely this weekend)

julienlarivee commented 1 year ago

@jlsjonas Any news on this?

jlsjonas commented 1 year ago

Hey, thanks for the ping! Sadly enough not, it's been quite a rollercoaster since writing that message (and I sadly enough lost track of it 😅)

Please stick with the workaround with cardmod (or other styling overrides) for the time being if you need the borders removed, once we have some more capacity (or if someone is interested) I'd still consider this to belong in our core, as entities is a core HA component (w.r.t. our current maintenance policy, given the lack of developer time)