Skip to content

Commit

Permalink
front: drop hardcoded scenario header height, second take
Browse files Browse the repository at this point in the history
This is a re-do of #7993, which got reverted in #8015 because of a
bug when the timetable contains lots of trains.

In a flex context, the implicit default value for min-height is
auto, and that prevents elements from overflowing with a scrollbar
(because min-height wins against height and max-height). Override
the default with "min-height: 0".
  • Loading branch information
emersion committed Aug 21, 2024
1 parent 6d88afe commit 897fa7c
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
}
}
.scenario-sidemenu {
display: flex;
flex-direction: column;
height: var(--content-height);
padding-top: 0.5rem;
padding-bottom: 0.5rem;
.scenario-details {
Expand Down Expand Up @@ -118,7 +121,8 @@
.scenario-timetable {
display: flex;
flex-direction: column;
height: calc(var(--content-height) - 11rem);
flex-grow: 1;
min-height: 0;
.scenario-timetable-addtrains-buttons {
display: flex;
align-items: center;
Expand Down Expand Up @@ -204,12 +208,8 @@
}
.scenario-timetable-trains {
overflow: auto;
height: auto;
min-height: 0;

@media screen and (max-width: 1023px) {
height: auto;
max-height: 50vh;
}
.scenario-timetable-train-with-right-bar {
position: relative;
display: flex;
Expand Down Expand Up @@ -480,7 +480,6 @@
}
.scenario-timetable-warnings {
margin-top: auto;
max-height: 45%;

.invalid-trains {
display: flex;
Expand Down

0 comments on commit 897fa7c

Please sign in to comment.