thomasloven / lovelace-card-mod

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

Styling of cards isn't applied until Edit/Save of dashboard #208

Closed mwilky closed 2 years ago

mwilky commented 2 years ago

My Home Assistant version: 0.XX.X

Home Assistant Core 2022.6.4

My lovelace configuration method (GUI or yaml):

GUI

What I am doing: Worked perfectly fine before recent HA upgrade. The styling doesnt apply until you edit and then save your dashboard. Going to a second dashboard and then returning put the style back in its broke state. You have to edit and save again to fix

What I expected to happen:

Working

What happened instead:

Not Working

Minimal steps to reproduce:

content: |
  # Kitchen
style:
  .: |
    ha-card {
      --ha-card-background: none !important;
      box-shadow: none !important;
      margin-top: 50px;
      margin-bottom: -15px;
      margin-left: 15px;

    }
  ha-markdown:
    $: |
      ha-markdown-element {
        letter-spacing: 0;
      }
      h1 {
        font-size: 20px !important;
        font-weight: 400;
      }
type: markdown

Error messages from the browser console:


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

ildar170975 commented 2 years ago

Already answered in the 1st place where this issue was created (in the HA frontend repo - https://github.com/home-assistant/frontend/issues/12920#issuecomment-1150924503). Answer was given before THIS issue was created. And that 1st misplaced issue is not closed yet.

mwilky commented 2 years ago

Already answered in the 1st place where this issue was created (in the HA frontend repo). Answer was given before THIS issue was created. And that 1st misplaced issue is not closed yet.

Closed original issue, weird how the code worked for over a year then stopped working all of a sudden.

Anyway thanks for help