diff --git a/src/components/ha-label-badge.ts b/src/components/ha-label-badge.ts index 5340ec4219..1cf25ec4e0 100644 --- a/src/components/ha-label-badge.ts +++ b/src/components/ha-label-badge.ts @@ -4,6 +4,8 @@ import { PropertyDeclarations, PropertyValues, TemplateResult, + CSSResult, + css, } from "lit-element"; import { classMap } from "lit-html/directives/class-map"; import "./ha-icon"; @@ -27,7 +29,6 @@ class HaLabelBadge extends LitElement { protected render(): TemplateResult | void { return html` - ${this.renderStyle()}
+ static get styles(): CSSResult[] { + return [ + css` .badge-container { display: inline-block; text-align: center; @@ -149,8 +150,8 @@ class HaLabelBadge extends LitElement { text-overflow: ellipsis; line-height: normal; } - - `; + `, + ]; } protected updated(changedProperties: PropertyValues): void {