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

Use static get styles() #2462

Closed
balloob opened this issue Jan 13, 2019 · 2 comments
Closed

Use static get styles() #2462

balloob opened this issue Jan 13, 2019 · 2 comments

Comments

@balloob
Copy link
Member

balloob commented Jan 13, 2019

With Lit Element 2.0.0-rc2, a new static get styles() was introduced. It will use performance optimizations for stylesheets when possible. This new method should return an array of CSS stylesheets that are rendered using the imported css tag from lit-element.

// Example
import haStyle from "./ha-style.ts";

class Bla extends LitElement {
      static get styles() {
        return [
          css`.header { color: green; }`,
          haStyle,
        ];
      }
}

We should migrate our elements to use this.

@iantrich
Copy link
Member

Do you want to keep this open as a reminder for conversion?

@balloob
Copy link
Member Author

balloob commented Feb 13, 2019

Nah

@balloob balloob closed this as completed Feb 13, 2019
@ghost ghost removed the to do label Feb 13, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
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