1

for my angular2 app I am using flexbox only and this works fine except with Safari (and Safari mobile). Problem with Safari is that a css height of 100% of a flex item sizes the element to 100% of main-app instead of taking other flex items into account. Maybe it is because main-app is the first parent with position set to absolute ? I have no clue how to fix that. Here's the code:

<div class='main-app flexColumn' [style.width.px]='width' [style.height.px]='height' [style.top.px]='posY' [style.left.px]='posX'>
    <menubar class='flex16_7'></menubar>
    <div class='flex81_3'>
        <router-outlet></router-outlet>
    </div>
</div>

with:

.flexColumn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    min-width: 0;
    min-height: 0;
}

.flex16_7 {
    flex: 1 1 16.66%;
    width: 100%;
    height: 100%;
}

.flex81_3 {
    flex: 1 1 81.33%;
    width: 100%;
    height: 100%;
}

Only Safari lets menubar fill the whole main-app. What is going on here ?

M.N. Bug
  • 253
  • 3
  • 11
  • I don't think this question is a duplicate, because in my case it is scaled to fill up the whole space instead of not sizing bigger. – M.N. Bug Apr 07 '17 at 06:20

0 Answers0