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

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

Closed
3 tasks done
mwilky opened this issue Jun 9, 2022 · 1 comment
Closed
3 tasks done

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

mwilky opened this issue Jun 9, 2022 · 1 comment

Comments

@mwilky
Copy link

mwilky commented Jun 9, 2022

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Card styling no longer seems to be working when you initially view the dashboard. If you edit/save the dashboard it then loads the styling correctly, but if you then navigate to a different dashboard and back the styling is lost again.

Code example below.

Describe the behavior you expected

Not working:
Not Working

Working:
Working

Steps to reproduce the issue

  1. Create card with above code
  2. Edit dashboard and save and then the styling will apply.
    3.Browse to different dashboard and return and the styling will be lost

What version of Home Assistant Core has the issue?

core-2022.6.4

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

Windows/Android

State of relevant entities

No response

Problem-relevant frontend configuration

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

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@ildar170975
Copy link
Contributor

ildar170975 commented Jun 9, 2022

  1. card-mod is a custom plugin and is not supposed to be reported in this repository.
  2. Your code is wrong.
  - type: markdown
    content: |
      # Kitchen
    card_mod:
      style:
        ha-markdown $: |
          h1 {
            font-size: 30px !important;
            font-weight: 400;
            letter-spacing: 8px;
          }
        .: |
          ha-card {
            --ha-card-background: none !important;
            box-shadow: none !important;
            margin-top: 50px;
            margin-bottom: -15px;
            margin-left: 15px;
          }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants