##// END OF EJS Templates
General CSS cleanup....
Brian Granger -
Show More
@@ -0,0 +1,103 b''
1
2 .border-box-sizing {
3 box-sizing: border-box;
4 -moz-box-sizing: border-box;
5 -webkit-box-sizing: border-box;
6 }
7
8 /* Flexible box model classes */
9 /* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
10
11 .hbox {
12 display: -webkit-box;
13 -webkit-box-orient: horizontal;
14 -webkit-box-align: stretch;
15
16 display: -moz-box;
17 -moz-box-orient: horizontal;
18 -moz-box-align: stretch;
19
20 display: box;
21 box-orient: horizontal;
22 box-align: stretch;
23 }
24
25 .hbox > * {
26 -webkit-box-flex: 0;
27 -moz-box-flex: 0;
28 box-flex: 0;
29 }
30
31 .vbox {
32 display: -webkit-box;
33 -webkit-box-orient: vertical;
34 -webkit-box-align: stretch;
35
36 display: -moz-box;
37 -moz-box-orient: vertical;
38 -moz-box-align: stretch;
39
40 display: box;
41 box-orient: vertical;
42 box-align: stretch;
43 }
44
45 .vbox > * {
46 -webkit-box-flex: 0;
47 -moz-box-flex: 0;
48 box-flex: 0;
49 }
50
51 .reverse {
52 -webkit-box-direction: reverse;
53 -moz-box-direction: reverse;
54 box-direction: reverse;
55 }
56
57 .box-flex0 {
58 -webkit-box-flex: 0;
59 -moz-box-flex: 0;
60 box-flex: 0;
61 }
62
63 .box-flex1, .box-flex {
64 -webkit-box-flex: 1;
65 -moz-box-flex: 1;
66 box-flex: 1;
67 }
68
69 .box-flex2 {
70 -webkit-box-flex: 2;
71 -moz-box-flex: 2;
72 box-flex: 2;
73 }
74
75 .box-group1 {
76 -webkit-box-flex-group: 1;
77 -moz-box-flex-group: 1;
78 box-flex-group: 1;
79 }
80
81 .box-group2 {
82 -webkit-box-flex-group: 2;
83 -moz-box-flex-group: 2;
84 box-flex-group: 2;
85 }
86
87 .start {
88 -webkit-box-pack: start;
89 -moz-box-pack: start;
90 box-pack: start;
91 }
92
93 .end {
94 -webkit-box-pack: end;
95 -moz-box-pack: end;
96 box-pack: end;
97 }
98
99 .center {
100 -webkit-box-pack: center;
101 -moz-box-pack: center;
102 box-pack: center;
103 } No newline at end of file
@@ -58,16 +58,6 b' 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 /* Normalize monospace sizing:
62 en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
63 pre, code, kbd, samp { font-family: monospace, sans-serif; }
64
65 pre {
66 text-align: left;
67 font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
68 font-size: 12pt;
69 }
70
71 body {
61 body {
72 background-color: white;
62 background-color: white;
73 /* This won't propagate to all children so we also set it below */
63 /* This won't propagate to all children so we also set it below */
@@ -82,21 +72,9 b' body {'
82 }
72 }
83
73
84 div#wrapper {
74 div#wrapper {
85 display: box;
86 display: -webkit-box;
87 display: -moz-box;
88
89 box-orient: vertical;
90 -webkit-box-orient: vertical;
91 -moz-box-orient: vertical;
92
93 /* This is needed to make sure the wrapper fills the body */
75 /* This is needed to make sure the wrapper fills the body */
94 width: 100%;
76 width: 100%;
95 height: 100%;
77 height: 100%;
96
97 box-sizing: border-box;
98 -moz-box-sizing: border-box;
99 -webkit-box-sizing: border-box;
100 }
78 }
101
79
102 span#ipython_notebook h1 {
80 span#ipython_notebook h1 {
@@ -139,15 +117,12 b' div.notebook {'
139 padding: 0px 40px;
117 padding: 0px 40px;
140 background-color: white;
118 background-color: white;
141 font-size: 12pt;
119 font-size: 12pt;
120 }
142
121
143 /* Allow the notebook div to take up the rest of the vertical space */
122 .monospace-font {
144 box-flex: 1;
123 font-family: monospace;
145 -webkit-box-flex: 1;
124 /* font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;*/
146 -moz-box-flex: 1;
125 font-size: 12pt;
147
148 box-sizing: border-box;
149 -moz-box-sizing: border-box;
150 -webkit-box-sizing: border-box;
151 }
126 }
152
127
153 div.cell {
128 div.cell {
@@ -156,21 +131,6 b' div.cell {'
156 /* This acts as a spacer between cells, that is outside the border */
131 /* This acts as a spacer between cells, that is outside the border */
157 margin: 15px 0px 15px 0px;
132 margin: 15px 0px 15px 0px;
158 position: relative;
133 position: relative;
159
160 box-sizing: border-box;
161 -moz-box-sizing: border-box;
162 -webkit-box-sizing: border-box;
163
164 display: box;
165 display: -webkit-box;
166 display: -moz-box;
167
168 box-orient: vertical;
169 -webkit-box-orient: vertical;
170 -moz-box-orient: vertical;
171
172 /* border-width: 1px;*/
173 /* border-style: solid;*/
174 }
134 }
175
135
176 div.code_cell {
136 div.code_cell {
@@ -181,45 +141,15 b' div.prompt {'
181 width: 90px;
141 width: 90px;
182 padding: 0px;
142 padding: 0px;
183 margin: 0px;
143 margin: 0px;
184 font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
185 }
186
187 div.input {
188 display: box;
189 display: -webkit-box;
190 display: -moz-box;
191
192 box-orient: horizontal;
193 -webkit-box-orient: horizontal;
194 -moz-box-orient: horizontal;
195
196 box-sizing: border-box;
197 -moz-box-sizing: border-box;
198 -webkit-box-sizing: border-box;
199
200 /* border-width: 1px;*/
201 /* border-style: solid;*/
202 }
144 }
203
145
204 div.input_prompt {
146 div.input_prompt {
205 color: blue;
147 color: blue;
206 }
148 }
207
149
208 div.input_area {
209 box-flex: 1;
210 -webkit-box-flex: 1;
211 -moz-box-flex: 1;
212
213 box-sizing: border-box;
214 -moz-box-sizing: border-box;
215 -webkit-box-sizing: border-box;
216 }
217
218 textarea.input_textarea {
150 textarea.input_textarea {
219 width: 100%;
151 width: 100%;
220 text-align: left;
152 text-align: left;
221 font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
222 font-size: 12pt;
223 border-style: none;
153 border-style: none;
224 padding: 0px;
154 padding: 0px;
225 margin: 0px;
155 margin: 0px;
@@ -231,31 +161,6 b' textarea.input_textarea {'
231 div.output {
161 div.output {
232 /* This is a spacer between the input and output of each cell */
162 /* This is a spacer between the input and output of each cell */
233 margin-top: 15px;
163 margin-top: 15px;
234
235 display: box;
236 display: -webkit-box;
237 display: -moz-box;
238
239 box-orient: vertical;
240 -webkit-box-orient: vertical;
241 -moz-box-orient: vertical;
242
243 box-sizing: border-box;
244 -moz-box-sizing: border-box;
245 -webkit-box-sizing: border-box;
246
247 /* border-width: 1px;*/
248 /* border-style: solid;*/
249 }
250
251 div.output_pyout {
252 display: box;
253 display: -webkit-box;
254 display: -moz-box;
255
256 box-orient: horizontal;
257 -webkit-box-orient: horizontal;
258 -moz-box-orient: horizontal;
259 }
164 }
260
165
261 div.output_prompt {
166 div.output_prompt {
@@ -265,27 +170,19 b' div.output_prompt {'
265 div.output_area {
170 div.output_area {
266 text-align: left;
171 text-align: left;
267 color: black;
172 color: black;
268 font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
269 font-size: 12pt;
270 }
173 }
271
174
272 div.output_latex {
175 div.output_latex {
176 /* Slightly bigger than the rest of the notebook */
273 font-size: 13pt;
177 font-size: 13pt;
274 }
178 }
275
179
276 .box_flex1 {
277 box-flex: 1;
278 -webkit-box-flex: 1;
279 -moz-box-flex: 1;
280 }
281
180
282 div.text_cell {
181 div.text_cell {
283 background-color: white;
182 background-color: white;
284 }
183 }
285
184
286 textarea.text_cell_input {
185 textarea.text_cell_input {
287 font-family: Monaco, Consolas, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
288 /* font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
289 /* Slightly bigger than the rest of the notebook */
186 /* Slightly bigger than the rest of the notebook */
290 font-size: 13pt;
187 font-size: 13pt;
291 outline: none;
188 outline: none;
@@ -659,12 +659,12 b' CodeCell.prototype = new Cell();'
659
659
660
660
661 CodeCell.prototype.create_element = function () {
661 CodeCell.prototype.create_element = function () {
662 var cell = $('<div></div>').addClass('cell code_cell');
662 var cell = $('<div></div>').addClass('cell code_cell vbox border-box-sizing');
663 var input = $('<div></div>').addClass('input');
663 var input = $('<div></div>').addClass('input hbox border-box-sizing');
664 input.append($('<div/>').addClass('prompt input_prompt'));
664 input.append($('<div/>').addClass('prompt input_prompt monospace-font'));
665 var input_textarea = $('<textarea/>').addClass('input_textarea').attr('rows',1).attr('wrap','hard').autogrow();
665 var input_textarea = $('<textarea/>').addClass('input_textarea monospace-font').attr('rows',1).attr('wrap','hard').autogrow();
666 input.append($('<div/>').addClass('input_area').append(input_textarea));
666 input.append($('<div/>').addClass('input_area box-flex1 border-box-sizing').append(input_textarea));
667 var output = $('<div></div>').addClass('output');
667 var output = $('<div></div>').addClass('output vbox border-box-sizing');
668 cell.append(input).append(output);
668 cell.append(input).append(output);
669 this.element = cell;
669 this.element = cell;
670 this.collapse()
670 this.collapse()
@@ -672,7 +672,7 b' CodeCell.prototype.create_element = function () {'
672
672
673
673
674 CodeCell.prototype.append_pyout = function (data, n) {
674 CodeCell.prototype.append_pyout = function (data, n) {
675 var toinsert = $("<div/>").addClass("output_area output_pyout");
675 var toinsert = $("<div/>").addClass("output_area output_pyout hbox monospace-font");
676 toinsert.append($('<div/>').
676 toinsert.append($('<div/>').
677 addClass('prompt output_prompt').
677 addClass('prompt output_prompt').
678 html('Out[' + n + ']:')
678 html('Out[' + n + ']:')
@@ -718,8 +718,8 b' CodeCell.prototype.append_display_data = function (data, element) {'
718
718
719 CodeCell.prototype.append_stream = function (data, element) {
719 CodeCell.prototype.append_stream = function (data, element) {
720 element = element || this.element.find("div.output");
720 element = element || this.element.find("div.output");
721 var toinsert = $("<div/>").addClass("output_area output_stream");
721 var toinsert = $("<div/>").addClass("output_area output_stream monospace-font");
722 toinsert.append($("<pre/>").html(fixConsole(data)));
722 toinsert.append($("<pre/>").addClass("monospace-font").html(fixConsole(data)));
723 element.append(toinsert);
723 element.append(toinsert);
724 return element;
724 return element;
725 };
725 };
@@ -738,7 +738,7 b' CodeCell.prototype.append_latex = function (latex, element) {'
738 // This method cannot do the typesetting because the latex first has to
738 // This method cannot do the typesetting because the latex first has to
739 // be on the page.
739 // be on the page.
740 element = element || this.element.find("div.output");
740 element = element || this.element.find("div.output");
741 var toinsert = $("<div/>").addClass("output_area output_latex");
741 var toinsert = $("<div/>").addClass("output_area output_latex monospace-font");
742 toinsert.append(latex);
742 toinsert.append(latex);
743 element.append(toinsert);
743 element.append(toinsert);
744 return element;
744 return element;
@@ -812,7 +812,7 b' TextCell.prototype.create_element = function () {'
812 var cell = $("<div>").addClass('cell text_cell').
812 var cell = $("<div>").addClass('cell text_cell').
813 append(
813 append(
814 $("<textarea>" + this.placeholder + "</textarea>").
814 $("<textarea>" + this.placeholder + "</textarea>").
815 addClass('text_cell_input').
815 addClass('text_cell_input monospace-font').
816 attr('rows',1).
816 attr('rows',1).
817 attr('cols',80).
817 attr('cols',80).
818 autogrow()
818 autogrow()
@@ -1007,6 +1007,9 b' Kernel.prototype.status_restarting = function () {'
1007
1007
1008 $(document).ready(function () {
1008 $(document).ready(function () {
1009
1009
1010 $('div#wrapper').addClass('vbox border-box-sizing')
1011 $('div.notebook').addClass('box-flex1 border-box-sizing')
1012
1010 MathJax.Hub.Config({
1013 MathJax.Hub.Config({
1011 tex2jax: {
1014 tex2jax: {
1012 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
1015 inlineMath: [ ['$','$'], ["\\(","\\)"] ],
@@ -6,6 +6,7 b''
6
6
7 <title>IPython Notebook</title>
7 <title>IPython Notebook</title>
8
8
9 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
9 <link rel="stylesheet" href="static/css/notebook.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/notebook.css" type="text/css" />
10
11
11 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
12 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
General Comments 0
You need to be logged in to leave comments. Login now