From 68188d8a15b16cc5b432dca69c1c1893a448419f 2014-03-11 21:45:37 From: MinRK Date: 2014-03-11 21:45:37 Subject: [PATCH] fix raw_input CSS I had to express padding in px, not em for consistent appearance. I'm not sure why. --- diff --git a/IPython/html/static/notebook/less/outputarea.less b/IPython/html/static/notebook/less/outputarea.less index c040cd6..39c6f42 100644 --- a/IPython/html/static/notebook/less/outputarea.less +++ b/IPython/html/static/notebook/less/outputarea.less @@ -140,11 +140,11 @@ div.output_javascript:empty { /* raw_input styles */ div.raw_input { - padding-top: 0px; - padding-bottom: 0px; - height: 1em; line-height: 1em; font-family: @monoFontFamily; + // for some reason, em padding doesn't compute the same for raw_input + // that is not the first input, but px does + padding-top: 5px; } span.input_prompt { @@ -156,12 +156,16 @@ input.raw_input { font-size: inherit; color: inherit; width: auto; - margin: -2px 0px 0px 1px; + margin: 0px 0px 0px 1px; padding-left: 1px; - padding-top: 2px; + padding-top: 0px; height: 1em; } +input.raw_input:focus { + box-shadow: none; +} + p.p-space { margin-bottom: 10px; } diff --git a/IPython/html/static/style/ipython.min.css b/IPython/html/static/style/ipython.min.css index 8d4fade..e5d6305 100644 --- a/IPython/html/static/style/ipython.min.css +++ b/IPython/html/static/style/ipython.min.css @@ -123,9 +123,10 @@ div.output_stderr{background:#fdd;} div.output_latex{text-align:left} div.output_javascript:empty{padding:0} .js-error{color:#8b0000} -div.raw_input{padding-top:0;padding-bottom:0;height:1em;line-height:1em;font-family:monospace} +div.raw_input{line-height:1em;font-family:monospace;padding-top:5px} span.input_prompt{font-family:inherit} -input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;margin:-2px 0 0 1px;padding-left:1px;padding-top:2px;height:1em} +input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;margin:0 0 0 1px;padding-left:1px;padding-top:0;height:1em} +input.raw_input:focus{box-shadow:none} p.p-space{margin-bottom:10px} .rendered_html{color:#000;}.rendered_html em{font-style:italic} .rendered_html strong{font-weight:bold} diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index e36a823..c5aeb9e 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -1400,9 +1400,10 @@ div.output_stderr{background:#fdd;} div.output_latex{text-align:left} div.output_javascript:empty{padding:0} .js-error{color:#8b0000} -div.raw_input{padding-top:0;padding-bottom:0;height:1em;line-height:1em;font-family:monospace} +div.raw_input{line-height:1em;font-family:monospace;padding-top:5px} span.input_prompt{font-family:inherit} -input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;margin:-2px 0 0 1px;padding-left:1px;padding-top:2px;height:1em} +input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;margin:0 0 0 1px;padding-left:1px;padding-top:0;height:1em} +input.raw_input:focus{box-shadow:none} p.p-space{margin-bottom:10px} .rendered_html{color:#000;}.rendered_html em{font-style:italic} .rendered_html strong{font-weight:bold}