Got it (finally!) like this :
.codeArea {
flex:1 1 auto;
margin-top:0;
height:100%;
position:relative;
}
.CodeMirror {
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
height:100%;
}
codeArea is the containing DIV. I had to set BOTH absolute positioning, corner positions AND 100% height to have it working.