Skip to content

Commit

Permalink
Fix label wrap (#20323)
Browse files Browse the repository at this point in the history
* Don't wrap headline on ha-menu-item

* Don't wrap text on ha-label
  • Loading branch information
piitaya authored Apr 2, 2024
1 parent 8a015f4 commit 169d782
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/ha-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 5 additions & 2 deletions src/components/ha-menu-item.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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;
}
`,
];
}
Expand Down

0 comments on commit 169d782

Please sign in to comment.