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

Add compabitility with legacy build #223

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

piitaya
Copy link
Contributor

@piitaya piitaya commented Aug 16, 2024

Fixes #222

With HA 2024.8, more devices are considered as legacy so this issue wasn't often visible before but was still present.
HA front-end ships two builds :

  • one for modern browser
  • one for legacy browser.

The legacy build comes with ShadyCSS polyfill to support scoped CSS. One of the limitation is that doesn't support dynamic CSS : (source: https://github.com/webcomponents/polyfills/tree/master/packages/shadycss#dynamically-created-styles-are-not-supported and https://lit.dev/docs/components/styles/#expressions-and-style-elements).

This PR use static css and use css variables and classes to apply dynamic style. Also, it is a best pratice to do that instead of regenerating the full css at each state change.

@mlamberts78 mlamberts78 merged commit ac080ba into mlamberts78:master Aug 21, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

No weather icons with 2024.8
2 participants