1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Fix new date-range-picker rendering on small screens (#51257)

This commit is contained in:
Tom Carpenter
2026-03-30 10:10:06 +01:00
committed by GitHub
parent ed96657085
commit a6ab6e218f

View File

@@ -309,17 +309,39 @@ export class DateRangePicker extends LitElement {
css`
.picker {
display: flex;
flex-direction: row;
}
.date-range-ranges {
border-right: 1px solid var(--divider-color);
min-width: 140px;
flex: 0 1 30%;
}
.range {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: var(--ha-space-3);
overflow-x: hidden;
}
@media only screen and (max-width: 460px) {
.picker {
flex-direction: column;
}
.date-range-ranges {
flex-basis: 180px;
border-bottom: 1px solid var(--divider-color);
border-right: none;
overflow-y: scroll;
}
.range {
flex-basis: fit-content;
}
}
.times {
@@ -334,12 +356,6 @@ export class DateRangePicker extends LitElement {
padding: var(--ha-space-2);
border-top: 1px solid var(--divider-color);
}
@media only screen and (max-width: 500px) {
.date-range-ranges {
max-width: 30%;
}
}
`,
];
}