mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Restore theme usage in stack card in panel view (#20264)
This commit is contained in:
parent
5dd029cc05
commit
d1119a3b61
@ -98,10 +98,10 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
|
|||||||
display: block;
|
display: block;
|
||||||
padding: 24px 16px 16px;
|
padding: 24px 16px 16px;
|
||||||
}
|
}
|
||||||
:host {
|
#root {
|
||||||
--ha-card-border-radius: inherit !important;
|
--ha-card-border-radius: var(--restore-card-border-radius, inherit);
|
||||||
--ha-card-border-width: inherit !important;
|
--ha-card-border-width: var(--restore-card-border-width, inherit);
|
||||||
--ha-card-box-shadow: inherit !important;
|
--ha-card-box-shadow: var(--restore-card-border-shadow, inherit);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,7 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
|||||||
|
|
||||||
const card: LovelaceCard = this.cards[0];
|
const card: LovelaceCard = this.cards[0];
|
||||||
card.isPanel = true;
|
card.isPanel = true;
|
||||||
|
card.toggleAttribute("no-border", true);
|
||||||
|
|
||||||
if (this.isStrategy || !this.lovelace?.editMode) {
|
if (this.isStrategy || !this.lovelace?.editMode) {
|
||||||
card.editMode = false;
|
card.editMode = false;
|
||||||
@ -116,6 +117,7 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const wrapper = document.createElement("hui-card-options");
|
const wrapper = document.createElement("hui-card-options");
|
||||||
|
wrapper.toggleAttribute("no-border", true);
|
||||||
wrapper.hass = this.hass;
|
wrapper.hass = this.hass;
|
||||||
wrapper.lovelace = this.lovelace;
|
wrapper.lovelace = this.lovelace;
|
||||||
wrapper.path = [this.index!, 0];
|
wrapper.path = [this.index!, 0];
|
||||||
@ -130,9 +132,12 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
--restore-card-border-radius: var(--ha-card-border-radius, 12px);
|
||||||
|
--restore-card-border-width: var(--ha-card-border-width, 1px);
|
||||||
|
--restore-card-box-shadow: var(--ha-card-box-shadow, none);
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
[no-border] {
|
||||||
--ha-card-border-radius: 0;
|
--ha-card-border-radius: 0;
|
||||||
--ha-card-border-width: 0;
|
--ha-card-border-width: 0;
|
||||||
--ha-card-box-shadow: none;
|
--ha-card-box-shadow: none;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user