##// END OF EJS Templates
Add LESS that enables meta-p printing
Jonathan Frederic -
Show More
@@ -1,94 +1,101 b''
1 1 div.cell {
2 2 border: 1px solid transparent;
3 3 .vbox();
4 4 .corner-all();
5 5 .border-box-sizing();
6 6 border-width: thin;
7 7 border-style: solid;
8 8
9 9 &.selected {
10 10 border-color: @border_color;
11 11 }
12 12
13 13 &.edit_mode {
14 14 border-color: green;
15 15 }
16 16
17 17 width: 100%;
18 18 padding: 5px 5px 5px 0px;
19 19 /* This acts as a spacer between cells, that is outside the border */
20 20 margin: 0px;
21 21 outline: none;
22 22 }
23 23
24 /* Don't border the cells when printing */
25 @media print {
26 div.cell {
27 border-color: transparent !important;
28 }
29 }
30
24 31 div.prompt {
25 32 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
26 33 min-width: 15ex;
27 34 /* This padding is tuned to match the padding on the CodeMirror editor. */
28 35 padding: @code_padding;
29 36 margin: 0px;
30 37 font-family: @font-family-monospace;
31 38 text-align: right;
32 39 /* This has to match that of the the CodeMirror class line-height below */
33 40 line-height: @code_line_height;
34 41 }
35 42
36 43 @media (max-width: 480px) {
37 44 // prompts are in the main column on small screens,
38 45 // so text should be left-aligned
39 46 div.prompt {
40 47 text-align: left;
41 48 }
42 49 }
43 50
44 51 div.inner_cell {
45 52 .vbox();
46 53 .box-flex1();
47 54 }
48 55
49 56 /* input_area and input_prompt must match in top border and margin for alignment */
50 57 div.input_area {
51 58 border: 1px solid @light_border_color;
52 59 .corner-all;
53 60 background: @cell_background;
54 61 line-height: @code_line_height;
55 62 }
56 63
57 64 /* This is needed so that empty prompt areas can collapse to zero height when there
58 65 is no content in the output_subarea and the prompt. The main purpose of this is
59 66 to make sure that empty JavaScript output_subareas have no height. */
60 67 div.prompt:empty {
61 68 padding-top: 0;
62 69 padding-bottom: 0;
63 70 }
64 71
65 72 div.unrecognized_cell {
66 73 // from text_cell
67 74 padding: 5px 5px 5px 0px;
68 75 .hbox();
69 76
70 77 .inner_cell {
71 78 .border-radius(@border-radius-base);
72 79 padding: 5px;
73 80 font-weight: bold;
74 81 color: red;
75 82 border: 1px solid @light_border_color;
76 83 background: darken(@cell_background, 5%);
77 84 // remove decoration from link
78 85 a {
79 86 color: inherit;
80 87 text-decoration: none;
81 88
82 89 &:hover {
83 90 color: inherit;
84 91 text-decoration: none;
85 92 }
86 93 }
87 94 }
88 95 }
89 96 @media (max-width: 480px) {
90 97 // remove prompt indentation on small screens
91 98 div.unrecognized_cell > div.prompt {
92 99 display: none;
93 100 }
94 101 }
@@ -1,44 +1,48 b''
1 /* avoid page breaking on code cells when printing */
2 @media print {
1 3 div.code_cell {
4 page-break-inside: avoid;
5 }
2 6 }
3 7
4 8 /* any special styling for code cells that are currently running goes here */
5 9 div.code_cell.running {
6 10 }
7 11
8 12 div.input {
9 13 page-break-inside: avoid;
10 14 .hbox();
11 15 }
12 16
13 17 @media (max-width: 480px) {
14 18 // move prompts above code on small screens
15 19 div.input {
16 20 .vbox();
17 21 }
18 22 }
19 23
20 24 /* input_area and input_prompt must match in top border and margin for alignment */
21 25 div.input_prompt {
22 26 color: @input_prompt_color;
23 27 border-top: 1px solid transparent;
24 28 }
25 29
26 30 // The styles related to div.highlight are for nbconvert HTML output only. This works
27 31 // because the .highlight div isn't present in the live notebook. We could put this into
28 32 // nbconvert, but it easily falls out of sync, can't use our less variables and doesn't
29 33 // help the basic template when paired with our CSS.
30 34
31 35 div.input_area > div.highlight {
32 36 margin: @code_padding;
33 37 border: none;
34 38 padding: 0px;
35 39 background-color: transparent;
36 40 }
37 41
38 42 div.input_area > div.highlight > pre {
39 43 margin: 0px;
40 44 border: none;
41 45 padding: 0px;
42 46 background-color: transparent;
43 47 }
44 48
@@ -1,93 +1,100 b''
1 1
2 2 body {
3 3 background-color: @body-bg;
4 4 }
5 5
6 6 @media (max-width: 767px) {
7 7 // remove bootstrap-responsive's body padding on small screens
8 8 body.notebook_app {
9 9 padding-left: 0px;
10 10 padding-right: 0px;
11 11 }
12 12 }
13 13
14 14 #ipython-main-app {
15 15 .border-box-sizing();
16 16 }
17 17
18 18 span#notebook_name {
19 19 height: 1em;
20 20 line-height: 1em;
21 21 padding: 3px;
22 22 border: none;
23 23 font-size: 146.5%;
24 24 &:hover{
25 25 // ensure body is lighter on dark palette,
26 26 // and vice versa
27 27 background-color:contrast(@body-bg, lighten(@body-bg,30%), darken(@body-bg,10%));
28 28 }
29 29 .corner-all;
30 30 }
31 31
32 32 div#notebook_panel {
33 33 margin: 0px 0px 0px 0px;
34 34 padding: 0px;
35 35 .border-box-sizing();
36 36 }
37 37 div#notebook {
38 38 font-size: @notebook_font_size;
39 39 line-height: @notebook_line_height;
40 40 overflow-y: hidden;
41 41 overflow-x: auto;
42 42 width: 100%;
43 43 /* This spaces the cell away from the edge of the notebook area */
44 44 padding: 2em 0 2em 0;
45 45 margin: 0px;
46 46 outline: none;
47 47 .border-box-sizing();
48 48 }
49 49
50 50 div.ui-widget-content {
51 51 border: 1px solid @border_color;
52 52 outline: none;
53 53 }
54 54
55 55 pre.dialog {
56 56 background-color: @cell_background;
57 57 border: 1px solid #ddd;
58 58 .corner-all;
59 59 padding: 0.4em;
60 60 padding-left: 2em;
61 61 }
62 62
63 63 p.dialog {
64 64 padding : 0.2em;
65 65 }
66 66
67 67 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
68 68 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
69 69 */
70 70 pre, code, kbd, samp { white-space: pre-wrap; }
71 71
72 72 #fonttest {
73 73 font-family: @font-family-monospace;
74 74 }
75 75
76 76 p {
77 77 margin-bottom:0;
78 78 }
79 79
80 80 .end_space {
81 81 height: 200px;
82 82 }
83 83
84 84 .lower-header-bar {
85 85 width: 100%;
86 86 height: 0px;
87 87 border-bottom: 1px solid @navbar-default-border;
88 88 margin-bottom: -1px;
89 89 }
90 90
91 91 .notebook_app #header {
92 92 .box-shadow(@notebook-shadow);
93 93 }
94
95 /* Hide the header when printing */
96 @media print {
97 #header, #header-spacer {
98 display: none !important;
99 }
100 }
General Comments 0
You need to be logged in to leave comments. Login now