flex-direction: column and flex-wrap: wrap wrong.flex: 1 0 auto and the number pad flex: 1000 0 auto, so that the number pad takes as much space as possible, while the side bar grows just as much as it needs. But Firefox doesn't realize that there are multiple columns when calculating the minimum required size (min-width: fit-content and min-width: max-content yield the exact same wrong width).