How to set editor height as 100% of the parent element?

How to set editor height as 100% of the parent element? Setting height as definite values works but it doesn’t work for percentage values.

import { EditorView } from '@codemirror/view'

let fullHeightTheme = EditorView.theme({
  '&': {
    height: '500px',
    // height: '100%', this doesn't make the editor fill the parent div
  },
})

This is more about CSS than about CodeMirror, but making the parent display: flex often makes it easier to do this kind of sizing.