mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Remove ha-space-0 (#28635)
* Remove ha-space-0 * Update src/components/ha-sidebar.ts Co-authored-by: Aidan Timson <aidan@timmo.dev> * Fix variable inside calc * Replace for variables --------- Co-authored-by: Aidan Timson <aidan@timmo.dev>
This commit is contained in:
2
.github/copilot-instructions.md
vendored
2
.github/copilot-instructions.md
vendored
@@ -154,7 +154,7 @@ try {
|
||||
|
||||
- **Use CSS custom properties**: Leverage the theme system
|
||||
- **Use spacing tokens**: Prefer `--ha-space-*` tokens over hardcoded values for consistent spacing
|
||||
- Spacing scale: `--ha-space-0` (0px) through `--ha-space-20` (80px) in 4px increments
|
||||
- Spacing scale: `--ha-space-1` (4px) through `--ha-space-20` (80px) in 4px increments
|
||||
- Defined in `src/resources/theme/core.globals.ts`
|
||||
- Common values: `--ha-space-2` (8px), `--ha-space-4` (16px), `--ha-space-8` (32px)
|
||||
- **Mobile-first responsive**: Design for mobile, enhance for desktop
|
||||
|
||||
@@ -175,7 +175,7 @@ export class HaAutomationRow extends LitElement {
|
||||
::slotted([slot="header"]) {
|
||||
flex: 1;
|
||||
overflow-wrap: anywhere;
|
||||
margin: var(--ha-space-0) var(--ha-space-3);
|
||||
margin: 0 var(--ha-space-3);
|
||||
}
|
||||
.icons {
|
||||
display: flex;
|
||||
|
||||
@@ -241,7 +241,7 @@ export class HaBottomSheet extends ScrollableFadeMixin(LitElement) {
|
||||
}
|
||||
slot[name="footer"] {
|
||||
display: block;
|
||||
padding: var(--ha-space-0);
|
||||
padding: 0;
|
||||
}
|
||||
::slotted([slot="footer"]) {
|
||||
display: flex;
|
||||
|
||||
@@ -46,14 +46,14 @@ export class HaCard extends LitElement {
|
||||
line-height: var(--ha-line-height-expanded);
|
||||
padding: var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);
|
||||
display: block;
|
||||
margin-block-start: var(--ha-space-0);
|
||||
margin-block-end: var(--ha-space-0);
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
font-weight: var(--ha-font-weight-normal);
|
||||
}
|
||||
|
||||
:host ::slotted(.card-content:not(:first-child)),
|
||||
slot:not(:first-child)::slotted(.card-content) {
|
||||
padding-top: var(--ha-space-0);
|
||||
padding-top: 0;
|
||||
margin-top: calc(var(--ha-space-2) * -1);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,14 +101,13 @@ export class HaDialog extends DialogBase {
|
||||
}
|
||||
.mdc-dialog__container {
|
||||
align-items: var(--vertical-align-dialog, center);
|
||||
padding: var(--dialog-container-padding, var(--ha-space-0));
|
||||
padding: var(--dialog-container-padding, 0);
|
||||
}
|
||||
.mdc-dialog__title {
|
||||
padding: var(--ha-space-4) var(--ha-space-4) var(--ha-space-0)
|
||||
var(--ha-space-4);
|
||||
padding: var(--ha-space-4) var(--ha-space-4) 0 var(--ha-space-4);
|
||||
}
|
||||
.mdc-dialog__title:has(span) {
|
||||
padding: var(--ha-space-3) var(--ha-space-3) var(--ha-space-0);
|
||||
padding: var(--ha-space-3) var(--ha-space-3) 0;
|
||||
}
|
||||
.mdc-dialog__title::before {
|
||||
content: unset;
|
||||
@@ -136,7 +135,7 @@ export class HaDialog extends DialogBase {
|
||||
--ha-dialog-surface-background,
|
||||
var(--mdc-theme-surface, #fff)
|
||||
);
|
||||
padding: var(--dialog-surface-padding, var(--ha-space-0));
|
||||
padding: var(--dialog-surface-padding, 0);
|
||||
}
|
||||
:host([flexContent]) .mdc-dialog .mdc-dialog__content {
|
||||
display: flex;
|
||||
@@ -168,7 +167,7 @@ export class HaDialog extends DialogBase {
|
||||
}
|
||||
.dialog-actions {
|
||||
inset-inline-start: initial !important;
|
||||
inset-inline-end: var(--ha-space-0) !important;
|
||||
inset-inline-end: 0 !important;
|
||||
direction: var(--direction);
|
||||
}
|
||||
`,
|
||||
|
||||
@@ -393,7 +393,7 @@ export class HaGenericPicker extends PickerMixin(LitElement) {
|
||||
}
|
||||
|
||||
wa-popover {
|
||||
--wa-space-l: var(--ha-space-0);
|
||||
--wa-space-l: 0;
|
||||
}
|
||||
|
||||
wa-popover::part(body) {
|
||||
@@ -418,7 +418,7 @@ export class HaGenericPicker extends PickerMixin(LitElement) {
|
||||
--ha-bottom-sheet-height: calc(100dvh - var(--ha-space-12));
|
||||
--ha-bottom-sheet-max-height: var(--ha-bottom-sheet-height);
|
||||
--ha-bottom-sheet-max-width: 600px;
|
||||
--ha-bottom-sheet-padding: var(--ha-space-0);
|
||||
--ha-bottom-sheet-padding: 0;
|
||||
--ha-bottom-sheet-surface-background: var(--card-background-color);
|
||||
--ha-bottom-sheet-border-radius: var(--ha-border-radius-2xl);
|
||||
}
|
||||
|
||||
@@ -175,10 +175,10 @@ export class HaMdDialog extends Dialog {
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-top: var(--safe-area-inset-top, var(--ha-space-0));
|
||||
margin-bottom: var(--safe-area-inset-bottom, var(--ha-space-0));
|
||||
margin-left: var(--safe-area-inset-left, var(--ha-space-0));
|
||||
margin-right: var(--safe-area-inset-right, var(--ha-space-0));
|
||||
margin-top: var(--safe-area-inset-top, 0);
|
||||
margin-bottom: var(--safe-area-inset-bottom, 0);
|
||||
margin-left: var(--safe-area-inset-left, 0);
|
||||
margin-right: var(--safe-area-inset-right, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
tooltip.style.display = "block";
|
||||
tooltip.style.position = "fixed";
|
||||
tooltip.style.top = `${top}px`;
|
||||
tooltip.style.left = `calc(${item.offsetLeft + item.clientWidth + 8}px + var(--safe-area-inset-left, var(--ha-space-0)))`;
|
||||
tooltip.style.left = `calc(${item.offsetLeft + item.clientWidth + 8}px + var(--safe-area-inset-left, 0px))`;
|
||||
}
|
||||
|
||||
private _hideTooltip() {
|
||||
@@ -720,14 +720,10 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
background-color: var(--sidebar-background-color);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: calc(
|
||||
14px + var(--safe-area-inset-bottom, var(--ha-space-0))
|
||||
);
|
||||
padding-bottom: calc(14px + var(--safe-area-inset-bottom, 0px));
|
||||
}
|
||||
.menu {
|
||||
height: calc(
|
||||
var(--header-height) + var(--safe-area-inset-top, var(--ha-space-0))
|
||||
);
|
||||
height: calc(var(--header-height) + var(--safe-area-inset-top, 0px));
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 0 var(--ha-space-1);
|
||||
@@ -746,16 +742,16 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
font-size: var(--ha-font-size-xl);
|
||||
align-items: center;
|
||||
padding-left: calc(
|
||||
var(--ha-space-1) + var(--safe-area-inset-left, var(--ha-space-0))
|
||||
var(--ha-space-1) + var(--safe-area-inset-left, 0px)
|
||||
);
|
||||
padding-inline-start: calc(
|
||||
var(--ha-space-1) + var(--safe-area-inset-left, var(--ha-space-0))
|
||||
var(--ha-space-1) + var(--safe-area-inset-left, 0px)
|
||||
);
|
||||
padding-inline-end: initial;
|
||||
padding-top: var(--safe-area-inset-top, var(--ha-space-0));
|
||||
padding-top: var(--safe-area-inset-top, 0px);
|
||||
}
|
||||
:host([expanded]) .menu {
|
||||
width: calc(256px + var(--safe-area-inset-left, var(--ha-space-0)));
|
||||
width: calc(256px + var(--safe-area-inset-left, 0px));
|
||||
}
|
||||
:host([narrow][expanded]) .menu {
|
||||
width: 100%;
|
||||
@@ -771,8 +767,8 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
display: none;
|
||||
}
|
||||
:host([narrow]) .title {
|
||||
margin: var(--ha-space-0);
|
||||
padding: var(--ha-space-0) var(--ha-space-4);
|
||||
margin: 0;
|
||||
padding: 0 var(--ha-space-4);
|
||||
}
|
||||
:host([expanded]) .title {
|
||||
display: initial;
|
||||
@@ -784,16 +780,13 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
ha-fade-in,
|
||||
ha-md-list {
|
||||
height: calc(
|
||||
100% - var(--header-height) - var(
|
||||
--safe-area-inset-top,
|
||||
var(--ha-space-0)
|
||||
) -
|
||||
100% - var(--header-height) - var(--safe-area-inset-top, 0px) -
|
||||
132px
|
||||
);
|
||||
}
|
||||
|
||||
ha-fade-in {
|
||||
padding: var(--ha-space-1) var(--ha-space-0);
|
||||
padding: var(--ha-space-1) 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -803,7 +796,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
ha-md-list {
|
||||
overflow-x: hidden;
|
||||
background: none;
|
||||
margin-left: var(--safe-area-inset-left, var(--ha-space-0));
|
||||
margin-left: var(--safe-area-inset-left, 0px);
|
||||
}
|
||||
|
||||
ha-md-list-item {
|
||||
@@ -825,7 +818,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
width: 248px;
|
||||
}
|
||||
:host([narrow][expanded]) ha-md-list-item {
|
||||
width: calc(240px - var(--safe-area-inset-left, var(--ha-space-0)));
|
||||
width: calc(240px - var(--safe-area-inset-left, 0px));
|
||||
}
|
||||
|
||||
ha-md-list-item.selected {
|
||||
@@ -898,7 +891,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
|
||||
border-radius: var(--ha-border-radius-md);
|
||||
font-size: 0.65em;
|
||||
line-height: var(--ha-line-height-expanded);
|
||||
padding: var(--ha-space-0) var(--ha-space-1);
|
||||
padding: 0 var(--ha-space-1);
|
||||
}
|
||||
|
||||
ha-md-list-item.user {
|
||||
|
||||
@@ -988,7 +988,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
style=${styleMap({
|
||||
width: "var(--ha-space-12)",
|
||||
position: "absolute",
|
||||
top: "var(--ha-space-0)",
|
||||
top: "0",
|
||||
left: rtl ? undefined : "var(--ha-space-1)",
|
||||
right: rtl ? "var(--ha-space-1)" : undefined,
|
||||
transform: rtl ? "scaleX(-1)" : "",
|
||||
@@ -1092,7 +1092,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
|
||||
z-index: 2;
|
||||
}
|
||||
.mdc-chip-set {
|
||||
padding: var(--ha-space-1) var(--ha-space-0);
|
||||
padding: var(--ha-space-1) 0;
|
||||
gap: var(--ha-space-2);
|
||||
}
|
||||
|
||||
|
||||
@@ -266,15 +266,15 @@ export class HaWaDialog extends ScrollableFadeMixin(LitElement) {
|
||||
/* Used to offset the dialog from the safe areas when space is limited */
|
||||
transform: translate(
|
||||
calc(
|
||||
var(--safe-area-offset-left, var(--ha-space-0)) - var(
|
||||
var(--safe-area-offset-left, 0px) - var(
|
||||
--safe-area-offset-right,
|
||||
var(--ha-space-0)
|
||||
0px
|
||||
)
|
||||
),
|
||||
calc(
|
||||
var(--safe-area-offset-top, var(--ha-space-0)) - var(
|
||||
var(--safe-area-offset-top, 0px) - var(
|
||||
--safe-area-offset-bottom,
|
||||
var(--ha-space-0)
|
||||
0px
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -285,7 +285,7 @@ export class HaWaDialog extends ScrollableFadeMixin(LitElement) {
|
||||
|
||||
@media all and (max-width: 450px), all and (max-height: 500px) {
|
||||
:host([type="standard"]) {
|
||||
--ha-dialog-border-radius: var(--ha-space-0);
|
||||
--ha-dialog-border-radius: 0;
|
||||
|
||||
wa-dialog {
|
||||
/* Make the container fill the whole screen width and not the safe width */
|
||||
@@ -372,7 +372,7 @@ export class HaWaDialog extends ScrollableFadeMixin(LitElement) {
|
||||
}
|
||||
|
||||
wa-dialog::part(footer) {
|
||||
padding: var(--ha-space-0);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::slotted([slot="footer"]) {
|
||||
|
||||
@@ -89,7 +89,7 @@ export class HaTargetPickerItemGroup extends LitElement {
|
||||
static styles = css`
|
||||
:host {
|
||||
display: block;
|
||||
--expansion-panel-content-padding: var(--ha-space-0);
|
||||
--expansion-panel-content-padding: 0;
|
||||
}
|
||||
ha-expansion-panel::part(summary) {
|
||||
background-color: var(--ha-color-fill-neutral-quiet-resting);
|
||||
@@ -101,7 +101,7 @@ export class HaTargetPickerItemGroup extends LitElement {
|
||||
min-height: unset;
|
||||
}
|
||||
ha-md-list {
|
||||
padding: var(--ha-space-0);
|
||||
padding: 0;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -605,8 +605,8 @@ export class HaTargetPickerItemRow extends LitElement {
|
||||
buttonLinkStyle,
|
||||
css`
|
||||
:host {
|
||||
--md-list-item-top-space: var(--ha-space-0);
|
||||
--md-list-item-bottom-space: var(--ha-space-0);
|
||||
--md-list-item-top-space: 0;
|
||||
--md-list-item-bottom-space: 0;
|
||||
--md-list-item-leading-space: var(--ha-space-2);
|
||||
--md-list-item-trailing-space: var(--ha-space-2);
|
||||
--md-list-item-two-line-container-height: 56px;
|
||||
|
||||
@@ -278,8 +278,8 @@ export class HaTargetPickerValueChip extends LitElement {
|
||||
direction: var(--direction);
|
||||
}
|
||||
.expand-btn {
|
||||
margin-right: var(--ha-space-0);
|
||||
margin-inline-end: var(--ha-space-0);
|
||||
margin-right: 0;
|
||||
margin-inline-end: 0;
|
||||
margin-inline-start: initial;
|
||||
}
|
||||
.mdc-chip.area:not(.add),
|
||||
|
||||
@@ -802,8 +802,7 @@ export class MoreInfoDialog extends ScrollableFadeMixin(LitElement) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin: var(--ha-space-0) var(--ha-space-0)
|
||||
calc(var(--ha-space-2) * -1) var(--ha-space-0);
|
||||
margin: 0 0 calc(var(--ha-space-2) * -1) 0;
|
||||
}
|
||||
|
||||
.title p {
|
||||
|
||||
@@ -1120,7 +1120,7 @@ export class QuickBar extends LitElement {
|
||||
}
|
||||
|
||||
.nothing-found {
|
||||
padding: var(--ha-space-4) var(--ha-space-0);
|
||||
padding: var(--ha-space-4) 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,8 +123,8 @@ export const ScrollableFadeMixin = <T extends Constructor<LitElement>>(
|
||||
.fade-top,
|
||||
.fade-bottom {
|
||||
position: absolute;
|
||||
left: var(--ha-space-0);
|
||||
right: var(--ha-space-0);
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--ha-space-4);
|
||||
pointer-events: none;
|
||||
transition: opacity 180ms ease-in-out;
|
||||
@@ -137,10 +137,10 @@ export const ScrollableFadeMixin = <T extends Constructor<LitElement>>(
|
||||
opacity: 0;
|
||||
}
|
||||
.fade-top {
|
||||
top: var(--ha-space-0);
|
||||
top: 0;
|
||||
}
|
||||
.fade-bottom {
|
||||
bottom: var(--ha-space-0);
|
||||
bottom: 0;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
@@ -2016,12 +2016,12 @@ class DialogAddAutomationElement
|
||||
--ha-bottom-sheet-height: calc(100dvh - var(--ha-space-12));
|
||||
--ha-bottom-sheet-max-height: var(--ha-bottom-sheet-height);
|
||||
--ha-bottom-sheet-max-width: 888px;
|
||||
--ha-bottom-sheet-padding: var(--ha-space-0);
|
||||
--ha-bottom-sheet-padding: 0;
|
||||
--ha-bottom-sheet-surface-background: var(--card-background-color);
|
||||
}
|
||||
|
||||
ha-wa-dialog {
|
||||
--dialog-content-padding: var(--ha-space-0);
|
||||
--dialog-content-padding: 0;
|
||||
--ha-dialog-min-height: min(
|
||||
800px,
|
||||
calc(
|
||||
@@ -2045,7 +2045,7 @@ class DialogAddAutomationElement
|
||||
|
||||
search-input {
|
||||
display: block;
|
||||
margin: var(--ha-space-0) var(--ha-space-4);
|
||||
margin: 0 var(--ha-space-4);
|
||||
}
|
||||
|
||||
ha-button-toggle-group {
|
||||
@@ -2079,7 +2079,7 @@ class DialogAddAutomationElement
|
||||
.groups {
|
||||
overflow: auto;
|
||||
flex: 4;
|
||||
margin-inline-end: var(--ha-space-0);
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
ha-automation-add-from-target.hidden {
|
||||
|
||||
@@ -213,8 +213,8 @@ export class HaAutomationAddItems extends LitElement {
|
||||
background-color: var(--ha-color-surface-default);
|
||||
align-items: center;
|
||||
color: var(--ha-color-text-secondary);
|
||||
padding: var(--ha-space-0);
|
||||
margin: var(--ha-space-0) var(--ha-space-4)
|
||||
padding: 0;
|
||||
margin: 0 var(--ha-space-4)
|
||||
max(var(--safe-area-inset-bottom), var(--ha-space-3));
|
||||
line-height: var(--ha-line-height-expanded);
|
||||
justify-content: center;
|
||||
@@ -233,7 +233,7 @@ export class HaAutomationAddItems extends LitElement {
|
||||
--md-list-item-supporting-text-font: var(--ha-font-family-body);
|
||||
--ha-md-list-item-gap: var(--ha-space-3);
|
||||
gap: var(--ha-space-2);
|
||||
padding: var(--ha-space-0) var(--ha-space-4);
|
||||
padding: 0 var(--ha-space-4);
|
||||
}
|
||||
.items ha-md-list ha-md-list-item {
|
||||
border-radius: var(--ha-border-radius-lg);
|
||||
|
||||
@@ -327,7 +327,7 @@ export class HaAutomationAddSearch extends LitElement {
|
||||
style=${styleMap({
|
||||
width: "var(--ha-space-12)",
|
||||
position: "absolute",
|
||||
top: "var(--ha-space-0)",
|
||||
top: "0",
|
||||
left: rtl ? undefined : "var(--ha-space-1)",
|
||||
right: rtl ? "var(--ha-space-1)" : undefined,
|
||||
transform: rtl ? "scaleX(-1)" : "",
|
||||
|
||||
@@ -462,7 +462,7 @@ class AddIntegrationDialog extends LitElement {
|
||||
style=${styleMap({
|
||||
width: `${this._width}px`,
|
||||
height: this._narrow
|
||||
? "calc(100vh - 184px - var(--safe-area-inset-top, var(--ha-space-0)) - var(--safe-area-inset-bottom, var(--ha-space-0)))"
|
||||
? "calc(100vh - 184px - var(--safe-area-inset-top, 0px) - var(--safe-area-inset-bottom, 0px))"
|
||||
: "500px",
|
||||
})}
|
||||
@click=${this._integrationPicked}
|
||||
|
||||
@@ -199,7 +199,7 @@ export class DialogLabsPreviewFeatureEnable
|
||||
|
||||
static readonly styles = css`
|
||||
ha-wa-dialog {
|
||||
--dialog-content-padding: var(--ha-space-0);
|
||||
--dialog-content-padding: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@@ -732,9 +732,7 @@ export class HuiAreaCard extends LitElement implements LovelaceCard {
|
||||
padding: 0 var(--ha-space-3) var(--ha-space-3) var(--ha-space-3);
|
||||
}
|
||||
.container.horizontal hui-card-features {
|
||||
width: calc(
|
||||
50% - var(--column-gap, var(--ha-space-0)) / 2 - var(--ha-space-3)
|
||||
);
|
||||
width: calc(50% - var(--column-gap, 0px) / 2 - var(--ha-space-3));
|
||||
flex: none;
|
||||
--feature-height: var(--ha-space-9);
|
||||
padding: 0 var(--ha-space-3);
|
||||
|
||||
@@ -142,11 +142,10 @@ export const haStyleDialog = css`
|
||||
--mdc-dialog-max-width: 600px;
|
||||
--mdc-dialog-max-width: min(600px, 95vw);
|
||||
--justify-action-buttons: space-between;
|
||||
--dialog-container-padding: var(--safe-area-inset-top, var(--ha-space-0))
|
||||
var(--safe-area-inset-right, var(--ha-space-0))
|
||||
var(--safe-area-inset-bottom, var(--ha-space-0))
|
||||
var(--safe-area-inset-left, var(--ha-space-0));
|
||||
--dialog-surface-padding: var(--ha-space-0);
|
||||
--dialog-container-padding: var(--safe-area-inset-top, 0)
|
||||
var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0)
|
||||
var(--safe-area-inset-left, 0);
|
||||
--dialog-surface-padding: 0px;
|
||||
}
|
||||
|
||||
ha-dialog .form {
|
||||
@@ -166,11 +165,10 @@ export const haStyleDialog = css`
|
||||
--mdc-dialog-min-height: 100svh;
|
||||
--mdc-dialog-max-height: 100vh;
|
||||
--mdc-dialog-max-height: 100svh;
|
||||
--dialog-container-padding: var(--ha-space-0);
|
||||
--dialog-surface-padding: var(--safe-area-inset-top, var(--ha-space-0))
|
||||
var(--safe-area-inset-right, var(--ha-space-0))
|
||||
var(--safe-area-inset-bottom, var(--ha-space-0))
|
||||
var(--safe-area-inset-left, var(--ha-space-0));
|
||||
--dialog-container-padding: 0px;
|
||||
--dialog-surface-padding: var(--safe-area-inset-top, 0)
|
||||
var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0)
|
||||
var(--safe-area-inset-left, 0);
|
||||
--vertical-align-dialog: flex-end;
|
||||
--ha-dialog-border-radius: var(--ha-border-radius-square);
|
||||
}
|
||||
@@ -188,13 +186,13 @@ export const haStyleDialogFixedTop = css`
|
||||
--mdc-dialog-max-height: calc(
|
||||
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
|
||||
--safe-area-inset-y,
|
||||
var(--ha-space-0)
|
||||
0px
|
||||
)
|
||||
);
|
||||
--mdc-dialog-max-height: calc(
|
||||
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
|
||||
--safe-area-inset-y,
|
||||
var(--ha-space-0)
|
||||
0px
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -202,7 +200,7 @@ export const haStyleDialogFixedTop = css`
|
||||
@media all and (max-width: 450px), all and (max-height: 500px) {
|
||||
ha-dialog {
|
||||
/* When in fullscreen, dialog should be attached to top */
|
||||
--dialog-surface-margin-top: var(--ha-space-0);
|
||||
--dialog-surface-margin-top: 0px;
|
||||
--mdc-dialog-min-height: 100vh;
|
||||
--mdc-dialog-min-height: 100svh;
|
||||
--mdc-dialog-max-height: 100vh;
|
||||
|
||||
@@ -21,7 +21,6 @@ export const coreStyles = css`
|
||||
--ha-border-radius-square: 0;
|
||||
|
||||
/* Spacing */
|
||||
--ha-space-0: 0px;
|
||||
--ha-space-1: 4px;
|
||||
--ha-space-2: 8px;
|
||||
--ha-space-3: 12px;
|
||||
|
||||
Reference in New Issue
Block a user