Notebook code cells only show ~14 lines due to CodeMirror height: 300px CSS conflict

Guan-Fu Liu
  • 6 Apr

Weixin Image_20260406171116_626_170.png

Hi, see from the inserted image: my jupyterhub just show only 14 lines for each code cell, and I have to scroll to the rest lines. Help by ChatGPT, I located the issue, which goes as follows,

In Firefox DevTools, I found that codemirror.min.css applies ".CodeMirror { height: 300px; }", while Jupyter's intended ".CodeMirror { height: auto; }" is present but not taking effect. Disabling the 300px rule immediately fixes the issue. This looks like a frontend CSS precedence / asset mismatch problem rather than a kernel or notebook-content issue.

  • Page 1 of 1