Fix label wrap (#20323)

* Don't wrap headline on ha-menu-item

* Don't wrap text on ha-label
This commit is contained in:
Paul Bottein 2024-04-02 15:20:22 +02:00 committed by GitHub
parent 8a015f4e38
commit 169d782580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -43,6 +43,7 @@ class HaLabel extends LitElement {
border-radius: 18px;
color: var(--ha-label-text-color);
--mdc-icon-size: 12px;
text-wrap: nowrap;
}
.content > * {
position: relative;

View File

@ -1,7 +1,7 @@
import { customElement } from "lit/decorators";
import { MdMenuItem } from "@material/web/menu/menu-item";
import "element-internals-polyfill";
import { CSSResult, css } from "lit";
import { MdMenuItem } from "@material/web/menu/menu-item";
import { customElement } from "lit/decorators";
@customElement("ha-menu-item")
export class HaMenuItem extends MdMenuItem {
@ -30,6 +30,9 @@ export class HaMenuItem extends MdMenuItem {
--md-menu-item-label-text-color: var(--error-color);
--md-menu-item-leading-icon-color: var(--error-color);
}
::slotted([slot="headline"]) {
text-wrap: nowrap;
}
`,
];
}