mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix stack card border radius reset on iOS (#20278)
This commit is contained in:
parent
bc14b8468d
commit
d56abe6b72
@ -35,6 +35,9 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
|
|||||||
|
|
||||||
@state() protected _config?: T;
|
@state() protected _config?: T;
|
||||||
|
|
||||||
|
@property({ type: Boolean, reflect: true })
|
||||||
|
public isPanel = false;
|
||||||
|
|
||||||
public getCardSize(): number | Promise<number> {
|
public getCardSize(): number | Promise<number> {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -98,10 +101,10 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
|
|||||||
display: block;
|
display: block;
|
||||||
padding: 24px 16px 16px;
|
padding: 24px 16px 16px;
|
||||||
}
|
}
|
||||||
#root {
|
:host([ispanel]) #root {
|
||||||
--ha-card-border-radius: var(--restore-card-border-radius, inherit);
|
--ha-card-border-radius: var(--restore-card-border-radius);
|
||||||
--ha-card-border-width: var(--restore-card-border-width, inherit);
|
--ha-card-border-width: var(--restore-card-border-width);
|
||||||
--ha-card-box-shadow: var(--restore-card-border-shadow, inherit);
|
--ha-card-box-shadow: var(--restore-card-border-shadow);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,6 @@ 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;
|
||||||
@ -117,7 +116,6 @@ 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];
|
||||||
@ -137,7 +135,7 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
|||||||
--restore-card-box-shadow: var(--ha-card-box-shadow, none);
|
--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