##// END OF EJS Templates
make input_area css generic to cells...
MinRK -
Show More
@@ -80,7 +80,7 b' var IPython = (function (IPython) {'
80 var inner_cell = $('<div/>').addClass('inner_cell');
80 var inner_cell = $('<div/>').addClass('inner_cell');
81 this.celltoolbar = new IPython.CellToolbar(this);
81 this.celltoolbar = new IPython.CellToolbar(this);
82 inner_cell.append(this.celltoolbar.element);
82 inner_cell.append(this.celltoolbar.element);
83 var input_area = $('<div/>').addClass('text_cell_input border-box-sizing');
83 var input_area = $('<div/>').addClass('input_area');
84 this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config);
84 this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config);
85 // The tabindex=-1 makes this div focusable.
85 // The tabindex=-1 makes this div focusable.
86 var render_area = $('<div/>').addClass('text_cell_render border-box-sizing').
86 var render_area = $('<div/>').addClass('text_cell_render border-box-sizing').
@@ -193,7 +193,7 b' var IPython = (function (IPython) {'
193 var text_cell = this.element;
193 var text_cell = this.element;
194 var output = text_cell.find("div.text_cell_render");
194 var output = text_cell.find("div.text_cell_render");
195 output.hide();
195 output.hide();
196 text_cell.find('div.text_cell_input').show();
196 text_cell.find('div.input_area').show();
197 if (this.get_text() === this.placeholder) {
197 if (this.get_text() === this.placeholder) {
198 this.set_text('');
198 this.set_text('');
199 }
199 }
@@ -361,7 +361,7 b' var IPython = (function (IPython) {'
361 .html()
361 .html()
362 );
362 );
363 }
363 }
364 this.element.find('div.text_cell_input').hide();
364 this.element.find('div.input_area').hide();
365 this.element.find("div.text_cell_render").show();
365 this.element.find("div.text_cell_render").show();
366 this.typeset();
366 this.typeset();
367 }
367 }
@@ -542,7 +542,7 b' var IPython = (function (IPython) {'
542 // user input and should be handled before set_rendered.
542 // user input and should be handled before set_rendered.
543 this.set_rendered(h);
543 this.set_rendered(h);
544 this.typeset();
544 this.typeset();
545 this.element.find('div.text_cell_input').hide();
545 this.element.find('div.input_area').hide();
546 this.element.find("div.text_cell_render").show();
546 this.element.find("div.text_cell_render").show();
547
547
548 }
548 }
@@ -38,6 +38,13 b' div.inner_cell {'
38 .box-flex1();
38 .box-flex1();
39 }
39 }
40
40
41 /* input_area and input_prompt must match in top border and margin for alignment */
42 div.input_area {
43 border: 1px solid @light_border_color;
44 .corner-all;
45 background: @cell_background;
46 }
47
41 /* This is needed so that empty prompt areas can collapse to zero height when there
48 /* This is needed so that empty prompt areas can collapse to zero height when there
42 is no content in the output_subarea and the prompt. The main purpose of this is
49 is no content in the output_subarea and the prompt. The main purpose of this is
43 to make sure that empty JavaScript output_subareas have no height. */
50 to make sure that empty JavaScript output_subareas have no height. */
@@ -11,12 +11,6 b' div.input {'
11 }
11 }
12
12
13 /* input_area and input_prompt must match in top border and margin for alignment */
13 /* input_area and input_prompt must match in top border and margin for alignment */
14 div.input_area {
15 border: 1px solid @light_border_color;
16 .corner-all;
17 background: @cell_background;
18 }
19
20 div.input_prompt {
14 div.input_prompt {
21 color: navy;
15 color: navy;
22 border-top: 1px solid transparent;
16 border-top: 1px solid transparent;
@@ -3,13 +3,6 b' div.text_cell {'
3 .hbox();
3 .hbox();
4 }
4 }
5
5
6 div.text_cell_input {
7 color: @textColor;
8 border: 1px solid @light_border_color;
9 .corner-all;
10 background: @cell_background;
11 }
12
13 div.text_cell_render {
6 div.text_cell_render {
14 /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
7 /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
15 outline: none;
8 outline: none;
@@ -73,9 +73,9 b' div.cell.edit_mode{border-radius:4px;border:thin #008000 solid}'
73 div.cell{width:100%;padding:5px 5px 5px 0;margin:0;outline:none}
73 div.cell{width:100%;padding:5px 5px 5px 0;margin:0;outline:none}
74 div.prompt{min-width:11ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.231em}
74 div.prompt{min-width:11ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.231em}
75 div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}
75 div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}
76 div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
76 div.prompt:empty{padding-top:0;padding-bottom:0}
77 div.prompt:empty{padding-top:0;padding-bottom:0}
77 div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
78 div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
78 div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
79 div.input_prompt{color:#000080;border-top:1px solid transparent}
79 div.input_prompt{color:#000080;border-top:1px solid transparent}
80 .CodeMirror{line-height:1.231em;height:auto;background:none;}
80 .CodeMirror{line-height:1.231em;height:auto;background:none;}
81 .CodeMirror-scroll{overflow-y:hidden;overflow-x:auto}
81 .CodeMirror-scroll{overflow-y:hidden;overflow-x:auto}
@@ -166,7 +166,6 b' p.p-space{margin-bottom:10px}'
166 .rendered_html img{display:block;margin-left:auto;margin-right:auto}
166 .rendered_html img{display:block;margin-left:auto;margin-right:auto}
167 .rendered_html *+img{margin-top:1em}
167 .rendered_html *+img{margin-top:1em}
168 div.text_cell{padding:5px 5px 5px 0;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
168 div.text_cell{padding:5px 5px 5px 0;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
169 div.text_cell_input{color:#000;border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
170 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:.5em .5em .5em .4em;color:#000}
169 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:.5em .5em .5em .4em;color:#000}
171 a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
170 a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
172 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
171 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
@@ -1350,9 +1350,9 b' div.cell.edit_mode{border-radius:4px;border:thin #008000 solid}'
1350 div.cell{width:100%;padding:5px 5px 5px 0;margin:0;outline:none}
1350 div.cell{width:100%;padding:5px 5px 5px 0;margin:0;outline:none}
1351 div.prompt{min-width:11ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.231em}
1351 div.prompt{min-width:11ex;padding:.4em;margin:0;font-family:monospace;text-align:right;line-height:1.231em}
1352 div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}
1352 div.inner_cell{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;display:flex;flex-direction:column;align-items:stretch;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1}
1353 div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
1353 div.prompt:empty{padding-top:0;padding-bottom:0}
1354 div.prompt:empty{padding-top:0;padding-bottom:0}
1354 div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
1355 div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
1355 div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
1356 div.input_prompt{color:#000080;border-top:1px solid transparent}
1356 div.input_prompt{color:#000080;border-top:1px solid transparent}
1357 .CodeMirror{line-height:1.231em;height:auto;background:none;}
1357 .CodeMirror{line-height:1.231em;height:auto;background:none;}
1358 .CodeMirror-scroll{overflow-y:hidden;overflow-x:auto}
1358 .CodeMirror-scroll{overflow-y:hidden;overflow-x:auto}
@@ -1443,7 +1443,6 b' p.p-space{margin-bottom:10px}'
1443 .rendered_html img{display:block;margin-left:auto;margin-right:auto}
1443 .rendered_html img{display:block;margin-left:auto;margin-right:auto}
1444 .rendered_html *+img{margin-top:1em}
1444 .rendered_html *+img{margin-top:1em}
1445 div.text_cell{padding:5px 5px 5px 0;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
1445 div.text_cell{padding:5px 5px 5px 0;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;display:flex;flex-direction:row;align-items:stretch}
1446 div.text_cell_input{color:#000;border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7}
1447 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:.5em .5em .5em .4em;color:#000}
1446 div.text_cell_render{outline:none;resize:none;width:inherit;border-style:none;padding:.5em .5em .5em .4em;color:#000}
1448 a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
1447 a.anchor-link:link{text-decoration:none;padding:0 20px;visibility:hidden}
1449 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
1448 h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link{visibility:visible}
General Comments 0
You need to be logged in to leave comments. Login now