##// END OF EJS Templates
Merge pull request #5331 from minrk/raw-input-css...
Brian E. Granger -
r15896:a4dd0cb5 merge
parent child Browse files
Show More
@@ -660,14 +660,14 b' var IPython = (function (IPython) {'
660 660 var area = this.create_output_area();
661 661
662 662 // disable any other raw_inputs, if they are left around
663 $("div.output_subarea.raw_input").remove();
663 $("div.output_subarea.raw_input_container").remove();
664 664
665 665 area.append(
666 666 $("<div/>")
667 .addClass("box-flex1 output_subarea raw_input")
667 .addClass("box-flex1 output_subarea raw_input_container")
668 668 .append(
669 669 $("<span/>")
670 .addClass("input_prompt")
670 .addClass("raw_input_prompt")
671 671 .text(content.prompt)
672 672 )
673 673 .append(
@@ -698,8 +698,8 b' var IPython = (function (IPython) {'
698 698 }
699 699
700 700 OutputArea.prototype._submit_raw_input = function (evt) {
701 var container = this.element.find("div.raw_input");
702 var theprompt = container.find("span.input_prompt");
701 var container = this.element.find("div.raw_input_container");
702 var theprompt = container.find("span.raw_input_prompt");
703 703 var theinput = container.find("input.raw_input");
704 704 var value = theinput.val();
705 705 var content = {
@@ -137,16 +137,15 b' div.output_javascript:empty {'
137 137
138 138 /* raw_input styles */
139 139
140 div.raw_input {
141 padding-top: 0px;
142 padding-bottom: 0px;
143 height: 1em;
144 line-height: 1em;
140 div.raw_input_container {
145 141 font-family: @monoFontFamily;
142 // for some reason, em padding doesn't compute the same for raw_input
143 // that is not the first input, but px does
144 padding-top: 5px;
146 145 }
147 146
148 span.input_prompt {
149 font-family: inherit;
147 span.raw_input_prompt {
148 /* nothing needed here */
150 149 }
151 150
152 151 input.raw_input {
@@ -154,10 +153,15 b' input.raw_input {'
154 153 font-size: inherit;
155 154 color: inherit;
156 155 width: auto;
157 margin: -2px 0px 0px 1px;
158 padding-left: 1px;
159 padding-top: 2px;
160 height: 1em;
156 /* make sure input baseline aligns with prompt */
157 vertical-align: baseline;
158 /* padding + margin = 0.5em between prompt and cursor */
159 padding: 0em 0.25em;
160 margin: 0em 0.25em;
161 }
162
163 input.raw_input:focus {
164 box-shadow: none;
161 165 }
162 166
163 167 p.p-space {
@@ -124,9 +124,10 b' div.output_stderr{background:#fdd;}'
124 124 div.output_latex{text-align:left}
125 125 div.output_javascript:empty{padding:0}
126 126 .js-error{color:#8b0000}
127 div.raw_input{padding-top:0;padding-bottom:0;height:1em;line-height:1em;font-family:monospace}
128 span.input_prompt{font-family:inherit}
129 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}
127 div.raw_input_container{font-family:monospace;padding-top:5px}
128 span.raw_input_prompt{}
129 input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;vertical-align:baseline;padding:0 .25em;margin:0 .25em}
130 input.raw_input:focus{box-shadow:none}
130 131 p.p-space{margin-bottom:10px}
131 132 .rendered_html{color:#000;}.rendered_html em{font-style:italic}
132 133 .rendered_html strong{font-weight:bold}
@@ -1401,9 +1401,10 b' div.output_stderr{background:#fdd;}'
1401 1401 div.output_latex{text-align:left}
1402 1402 div.output_javascript:empty{padding:0}
1403 1403 .js-error{color:#8b0000}
1404 div.raw_input{padding-top:0;padding-bottom:0;height:1em;line-height:1em;font-family:monospace}
1405 span.input_prompt{font-family:inherit}
1406 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}
1404 div.raw_input_container{font-family:monospace;padding-top:5px}
1405 span.raw_input_prompt{}
1406 input.raw_input{font-family:inherit;font-size:inherit;color:inherit;width:auto;vertical-align:baseline;padding:0 .25em;margin:0 .25em}
1407 input.raw_input:focus{box-shadow:none}
1407 1408 p.p-space{margin-bottom:10px}
1408 1409 .rendered_html{color:#000;}.rendered_html em{font-style:italic}
1409 1410 .rendered_html strong{font-weight:bold}
General Comments 0
You need to be logged in to leave comments. Login now