From 133b96d086c0ff12d9112010078bc3aa967e0be1 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Fri, 19 Aug 2011 15:49:50 -0700 Subject: [PATCH] Changing CodeMirror-scroll to overflow-y: hidden. * It seems that our old setting of visible was causing scroll bars to appear if font sizes change in Chrome. * Also changed json -> xml in Download UI. --- IPython/frontend/html/notebook/static/css/notebook.css | 10 ++++++---- IPython/frontend/html/notebook/templates/notebook.html | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/IPython/frontend/html/notebook/static/css/notebook.css b/IPython/frontend/html/notebook/static/css/notebook.css index e92bf5246..0b39dd04d 100644 --- a/IPython/frontend/html/notebook/static/css/notebook.css +++ b/IPython/frontend/html/notebook/static/css/notebook.css @@ -266,13 +266,15 @@ div.text_cell_render { } .CodeMirror { - line-height: 1.231; /* Changed from 1em to our global default */ + line-height: 1.231; /* Changed from 1em to our global default */ } .CodeMirror-scroll { - height: auto; /* Changed to auto to autogrow */ - overflow-y: visible; /* Changed from auto to remove scrollbar */ - overflow-x: auto; /* Changed from auto to remove scrollbar */ + height: auto; /* Changed to auto to autogrow */ + /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ + /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ + overflow-y: hidden; + overflow-x: auto; /* Changed from auto to remove scrollbar */ } /* CSS font colors for translated ANSI colors. */ diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index f0afcc91c..9950d2f68 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -62,7 +62,7 @@