I want to create a page that satisfies the following conditions:
- contains some texts in the first part and a code mirror in the second part
- the texts in the first part are almost fixed (therefore their height is almost fixed), and I want the height of the mirror code to fill exactly the rest of the page. If there are many texts in the code mirror, use scrolling.
Then I create this plunker :
<style> .rb { display: flex; flex-direction: column; height: 100%; } .rb .CodeMirror { flex: 1; } </style> <div class="rb"> 1<br/>2<br/>3<br/>4<br/> <textarea ng-model="body" ui-codemirror="option"></textarea> </div>
It works fine in Chrome, however it does not work in Safari: the height of the mirror code is incorrect; we immediately see the problem:

Does anyone know how to fix this? I used to have a solution with calc (minus a fixed number of px), but I can no longer find it.
css cross-browser flexbox height ui-codemirror
SoftTimur
source share