diff --git a/IPython/frontend/html/notebook/static/notebook/less/codemirror.less b/IPython/frontend/html/notebook/static/notebook/less/codemirror.less
index 4b3fbec..6c2457c 100644
--- a/IPython/frontend/html/notebook/static/notebook/less/codemirror.less
+++ b/IPython/frontend/html/notebook/static/notebook/less/codemirror.less
@@ -28,6 +28,18 @@
padding: 0.4em;
}
+.CodeMirror-linenumber {
+ // This is needed to fine tune the position of the line numbers because we use the 0.4em
+ // spacing in various places. Fine tuned to look right.
+ padding: 0 8px 0 4px;
+}
+
+.CodeMirror-gutters {
+ // This is needed because our cell has rounded corners, otherwise the gutter area square
+ // corner cuts into the rounded cell border.
+ .corner-all;
+}
+
.CodeMirror pre {
/* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */
/* .CodeMirror-lines */
diff --git a/IPython/frontend/html/notebook/static/style/style.min.css b/IPython/frontend/html/notebook/static/style/style.min.css
index 2c8bc45..e207c96 100644
--- a/IPython/frontend/html/notebook/static/style/style.min.css
+++ b/IPython/frontend/html/notebook/static/style/style.min.css
@@ -942,6 +942,8 @@ div.output_prompt{color:darkred;margin:0 5px 0 -5px;}
.CodeMirror{line-height:1.231;height:auto;background:none;}
.CodeMirror-scroll{overflow-y:hidden;overflow-x:auto;}
.CodeMirror-lines{padding:0.4em;}
+.CodeMirror-linenumber{padding:0 8px 0 4px;}
+.CodeMirror-gutters{border-radius:4px;}
.CodeMirror pre{padding:0;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
.completions{position:absolute;z-index:10;overflow:hidden;border:1px solid #ababab;border-radius:4px;-webkit-box-shadow:0px 6px 10px -1px #adadad;-moz-box-shadow:0px 6px 10px -1px #adadad;box-shadow:0px 6px 10px -1px #adadad;}
.completions select{background:white;outline:none;border:none;padding:0px;margin:0px;overflow:auto;font-family:monospace;font-size:110%;color:#000000;}