##// END OF EJS Templates
Updating font-sizing to use the YUI protocol.
Brian E. Granger -
Show More
@@ -1,6 +1,4
1 .CodeMirror {
1 .CodeMirror {
2 overflow: hidden; /* Changed from auto to remove scrollbar */
3 height: auto; /* Changed to auto to autogrow */
4 line-height: 1em;
2 line-height: 1em;
5 font-family: monospace;
3 font-family: monospace;
6 }
4 }
@@ -18,10 +16,6
18 padding: .4em .2em .4em .4em;
16 padding: .4em .2em .4em .4em;
19 }
17 }
20 .CodeMirror-lines {
18 .CodeMirror-lines {
21 /* Changed from 0.4em, but this gives us jitters upon typing, but I found
22 that removing .CodeMirror line-height: 1em above, it goes away.
23 For now I am using the default of 0.4em, but I have added a 0.4em
24 padding to prompts to match this.*/
25 padding: 0.4em;
19 padding: 0.4em;
26 }
20 }
27
21
@@ -29,7 +29,7 time, mark, audio, video {
29 margin: 0;
29 margin: 0;
30 padding: 0;
30 padding: 0;
31 border: 0;
31 border: 0;
32 /* font-size: 100%;*/
32 font-size: 100%;
33 font: inherit;
33 font: inherit;
34 vertical-align: baseline;
34 vertical-align: baseline;
35 }
35 }
@@ -58,10 +58,28 hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin:
58
58
59 input, select { vertical-align: middle; }
59 input, select { vertical-align: middle; }
60
60
61
62 /**
63 * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
64 */
65
66 body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
67 select, input, textarea, button { font:99% sans-serif; }
68
69 /* Normalize monospace sizing:
70 en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
71 pre, code, kbd, samp { font-family: monospace, sans-serif; }
72
73
74 /**
75 * Primary styles
76 *
77 * Author: IPython Development Team
78 */
79
80
61 body {
81 body {
62 background-color: white;
82 background-color: white;
63 /* This won't propagate to all children so we also set it below */
64 font-size: 11pt;
65 /* This makes sure that the body covers the entire window and needs to
83 /* This makes sure that the body covers the entire window and needs to
66 be in a different element than the display: box in wrapper below */
84 be in a different element than the display: box in wrapper below */
67 position: absolute;
85 position: absolute;
@@ -83,11 +101,12 div#header {
83
101
84 span#ipython_notebook {
102 span#ipython_notebook {
85 position: absolute;
103 position: absolute;
104 padding: 2px;
86 }
105 }
87
106
88 span#ipython_notebook h1 {
107 span#ipython_notebook h1 {
89 font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
108 font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
90 font-size: 22pt;
109 font-size: 197%;
91 display: inline;
110 display: inline;
92 }
111 }
93
112
@@ -145,13 +164,6 div.section_content {
145 padding: 5px;
164 padding: 5px;
146 }
165 }
147
166
148 /*#expand_cell, #collapse_cell, #insert_cell_above, #insert_cell_below,*/
149 /*#move_cell_up, #move_cell_down, #to_code, #to_text, #run_selected_cell,*/
150 /*#run_all_cells, #int_kernel, #restart_kernel, #python_help, #ipython_help,*/
151 /*#numpy_help, #matplotlib_help, #scipy_help, #sympy_help, #new_notebook,*/
152 /*#open_notebook {*/
153 /* width: 60px;*/
154 /*}*/
155
167
156 span.section_row_buttons > button {
168 span.section_row_buttons > button {
157 width: 60px;
169 width: 60px;
@@ -167,14 +179,14 span.section_row_buttons > button {
167
179
168 .section_row_header {
180 .section_row_header {
169 float: left;
181 float: left;
170 font-size: 0.8em;
182 font-size: 85%;
171 padding: 0.2em 0em;
183 padding: 0.2em 0em;
172 font-weight: bold;
184 font-weight: bold;
173 }
185 }
174
186
175 span.button_label {
187 span.button_label {
176 padding: 0.2em 1em;
188 padding: 0.2em 1em;
177 font-size: 0.8em;
189 font-size: 77%;
178 float: right;
190 float: right;
179 }
191 }
180
192
@@ -187,7 +199,7 span.button_label {
187
199
188 .ui-button .ui-button-text {
200 .ui-button .ui-button-text {
189 padding: 0.2em 0.8em;
201 padding: 0.2em 0.8em;
190 font-size: 0.7em;
202 font-size: 77%;
191 }
203 }
192
204
193 div#left_panel_splitter {
205 div#left_panel_splitter {
@@ -212,7 +224,6 div#notebook {
212 padding: 0px 15px 0px 15px;
224 padding: 0px 15px 0px 15px;
213 margin: 0px
225 margin: 0px
214 background-color: white;
226 background-color: white;
215 font-size: 11pt;
216 }
227 }
217
228
218 div#pager_splitter {
229 div#pager_splitter {
@@ -224,11 +235,6 div#pager {
224 overflow: auto;
235 overflow: auto;
225 }
236 }
226
237
227 .monospace-font {
228 font-family: monospace;
229 font-size: 11pt;
230 }
231
232 div.cell {
238 div.cell {
233 width: 100%;
239 width: 100%;
234 padding: 5px;
240 padding: 5px;
@@ -241,10 +247,10 div.code_cell {
241 }
247 }
242
248
243 div.prompt {
249 div.prompt {
244 width: 90px;
250 width: 80px;
245 padding: 0.4em;
251 padding: 0.4em;
246 margin: 0px;
252 margin: 0px;
247 line-height: 1em;
253 font-family: monospace;
248 }
254 }
249
255
250 div.input_prompt {
256 div.input_prompt {
@@ -263,11 +269,16 div.output_prompt {
263 div.output_area {
269 div.output_area {
264 text-align: left;
270 text-align: left;
265 color: black;
271 color: black;
272 font-family: monospace;
273 }
274
275 div.output_stream {
276 padding: 0.4em;
266 }
277 }
267
278
268 div.output_latex {
279 div.output_latex {
269 /* Slightly bigger than the rest of the notebook */
280 /* Slightly bigger than the rest of the notebook */
270 font-size: 12pt;
281 font-size: 116%;
271 }
282 }
272
283
273 div.output_png {
284 div.output_png {
@@ -279,7 +290,8 div.text_cell {
279
290
280 textarea.text_cell_input {
291 textarea.text_cell_input {
281 /* Slightly bigger than the rest of the notebook */
292 /* Slightly bigger than the rest of the notebook */
282 font-size: 12pt;
293 font-size: 116%;
294 font-family: monospace;
283 outline: none;
295 outline: none;
284 resize: none;
296 resize: none;
285 width: inherit;
297 width: inherit;
@@ -292,7 +304,7 textarea.text_cell_input {
292 div.text_cell_render {
304 div.text_cell_render {
293 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
305 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
294 /* Slightly bigger than the rest of the notebook */
306 /* Slightly bigger than the rest of the notebook */
295 font-size: 12pt;
307 font-size: 116%;
296 outline: none;
308 outline: none;
297 resize: none;
309 resize: none;
298 width: inherit;
310 width: inherit;
@@ -306,12 +318,12 div.text_cell_render strong {font-weight: bold;}
306 div.text_cell_render u {text-decoration: underline;}
318 div.text_cell_render u {text-decoration: underline;}
307 div.text_cell_render :link { text-decoration: underline }
319 div.text_cell_render :link { text-decoration: underline }
308 div.text_cell_render :visited { text-decoration: underline }
320 div.text_cell_render :visited { text-decoration: underline }
309 div.text_cell_render h1 {font-size: 2.0em; margin: .67em 0; font-weight: bold;}
321 div.text_cell_render h1 {font-size: 197%; margin: .67em 0; font-weight: bold;}
310 div.text_cell_render h2 {font-size: 1.5em; margin: .75em 0; font-weight: bold;}
322 div.text_cell_render h2 {font-size: 153.9%; margin: .75em 0; font-weight: bold;}
311 div.text_cell_render h3 {font-size: 1.17em; margin: .83em 0; font-weight: bold;}
323 div.text_cell_render h3 {font-size: 116%; margin: .83em 0; font-weight: bold;}
312 div.text_cell_render h4 {margin: 1.12em 0; font-weight: bold;}
324 div.text_cell_render h4 {margin: 1.12em 0; font-weight: bold;}
313 div.text_cell_render h5 {font-size: .83em; margin: 1.5em 0; font-weight: bold;}
325 div.text_cell_render h5 {font-size: 85%.; margin: 1.5em 0; font-weight: bold;}
314 div.text_cell_render h6 {font-size: .75em; margin: 1.67em 0; font-weight: bold;}
326 div.text_cell_render h6 {font-size: 77%; margin: 1.67em 0; font-weight: bold;}
315 div.text_cell_render ul {list-style:disc; margin-left: 40px;}
327 div.text_cell_render ul {list-style:disc; margin-left: 40px;}
316 div.text_cell_render ul ul {list-style:square; margin-left: 40px;}
328 div.text_cell_render ul ul {list-style:square; margin-left: 40px;}
317 div.text_cell_render ul ul ul {list-style:circle; margin-left: 40px;}
329 div.text_cell_render ul ul ul {list-style:circle; margin-left: 40px;}
@@ -322,3 +334,9 div.text_cell_render ol ol ol ol {list-style:lower-alpha;}
322 div.text_cell_render ol ol ol ol ol {list-style:lower-roman;}
334 div.text_cell_render ol ol ol ol ol {list-style:lower-roman;}
323
335
324
336
337 .CodeMirror {
338 overflow: hidden; /* Changed from auto to remove scrollbar */
339 height: auto; /* Changed to auto to autogrow */
340 line-height: 1.231; /* Changed from 1em to our global default */
341 }
342
@@ -20,7 +20,7 var IPython = (function (IPython) {
20 CodeCell.prototype.create_element = function () {
20 CodeCell.prototype.create_element = function () {
21 var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox');
21 var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox');
22 var input = $('<div></div>').addClass('input hbox');
22 var input = $('<div></div>').addClass('input hbox');
23 input.append($('<div/>').addClass('prompt input_prompt monospace-font'));
23 input.append($('<div/>').addClass('prompt input_prompt'));
24 var input_area = $('<div/>').addClass('input_area box-flex1');
24 var input_area = $('<div/>').addClass('input_area box-flex1');
25 this.code_mirror = CodeMirror(input_area.get(0), {
25 this.code_mirror = CodeMirror(input_area.get(0), {
26 indentUnit : 4,
26 indentUnit : 4,
@@ -55,7 +55,7 var IPython = (function (IPython) {
55
55
56
56
57 CodeCell.prototype.append_pyout = function (data, n) {
57 CodeCell.prototype.append_pyout = function (data, n) {
58 var toinsert = $("<div/>").addClass("output_area output_pyout hbox monospace-font");
58 var toinsert = $("<div/>").addClass("output_area output_pyout hbox");
59 toinsert.append($('<div/>').
59 toinsert.append($('<div/>').
60 addClass('prompt output_prompt').
60 addClass('prompt output_prompt').
61 html('Out[' + n + ']:')
61 html('Out[' + n + ']:')
@@ -103,8 +103,8 var IPython = (function (IPython) {
103
103
104 CodeCell.prototype.append_stream = function (data, element) {
104 CodeCell.prototype.append_stream = function (data, element) {
105 element = element || this.element.find("div.output");
105 element = element || this.element.find("div.output");
106 var toinsert = $("<div/>").addClass("output_area output_stream monospace-font");
106 var toinsert = $("<div/>").addClass("output_area output_stream");
107 toinsert.append($("<pre/>").addClass("monospace-font").html(utils.fixConsole(data)));
107 toinsert.append($("<pre/>").html(utils.fixConsole(data)));
108 element.append(toinsert);
108 element.append(toinsert);
109 return element;
109 return element;
110 };
110 };
@@ -132,7 +132,7 var IPython = (function (IPython) {
132 // This method cannot do the typesetting because the latex first has to
132 // This method cannot do the typesetting because the latex first has to
133 // be on the page.
133 // be on the page.
134 element = element || this.element.find("div.output");
134 element = element || this.element.find("div.output");
135 var toinsert = $("<div/>").addClass("output_area output_latex monospace-font");
135 var toinsert = $("<div/>").addClass("output_area output_latex");
136 toinsert.append(latex);
136 toinsert.append(latex);
137 element.append(toinsert);
137 element.append(toinsert);
138 return element;
138 return element;
@@ -57,9 +57,7 var IPython = (function (IPython) {
57 that.select_next();
57 that.select_next();
58 };
58 };
59 } else if (event.which === 13 && event.shiftKey) {
59 } else if (event.which === 13 && event.shiftKey) {
60 console.log('Entering execute');
61 that.execute_selected_cell(true);
60 that.execute_selected_cell(true);
62 console.log('Leaving execute');
63 };
61 };
64 });
62 });
65
63
@@ -29,8 +29,10 $(document).ready(function () {
29 IPython.kernel_status_widget = new IPython.KernelStatusWidget('#kernel_status');
29 IPython.kernel_status_widget = new IPython.KernelStatusWidget('#kernel_status');
30 IPython.kernel_status_widget.status_idle();
30 IPython.kernel_status_widget.status_idle();
31
31
32 IPython.layout_manager.do_resize();
32 IPython.notebook.insert_code_cell_after();
33 IPython.notebook.insert_code_cell_after();
33 IPython.layout_manager.do_resize();
34 IPython.layout_manager.do_resize();
34 IPython.pager.collapse();
35 IPython.pager.collapse();
36 IPython.layout_manager.do_resize();
35 });
37 });
36
38
@@ -81,9 +81,8 var IPython = (function (IPython) {
81
81
82
82
83 Pager.prototype.append_text = function (text) {
83 Pager.prototype.append_text = function (text) {
84 var toinsert = $("<div/>").addClass("output_area output_stream monospace-font");
84 var toinsert = $("<div/>").addClass("output_area output_stream");
85 toinsert.append($("<pre/>").addClass("monospace-font").
85 toinsert.append($('<pre/>').html(utils.fixConsole(text)));
86 html(utils.fixConsole(text)));
87 this.pager_element.append(toinsert);
86 this.pager_element.append(toinsert);
88 };
87 };
89
88
@@ -19,7 +19,7 var IPython = (function (IPython) {
19 var cell = $("<div>").addClass('cell text_cell border-box-sizing').
19 var cell = $("<div>").addClass('cell text_cell border-box-sizing').
20 append(
20 append(
21 $("<textarea>" + this.placeholder + "</textarea>").
21 $("<textarea>" + this.placeholder + "</textarea>").
22 addClass('text_cell_input monospace-font').
22 addClass('text_cell_input').
23 attr('rows',1).
23 attr('rows',1).
24 attr('cols',80).
24 attr('cols',80).
25 autogrow()
25 autogrow()
General Comments 0
You need to be logged in to leave comments. Login now