##// END OF EJS Templates
abstract hard-coded style values to be variables for different theming
Jason Grout -
Show More
@@ -1,44 +1,44 b''
1 1 div.code_cell {
2 2 }
3 3
4 4 /* any special styling for code cells that are currently running goes here */
5 5 div.code_cell.running {
6 6 }
7 7
8 8 div.input {
9 9 page-break-inside: avoid;
10 10 .hbox();
11 11 }
12 12
13 13 @media (max-width: 480px) {
14 14 // move prompts above code on small screens
15 15 div.input {
16 16 .vbox();
17 17 }
18 18 }
19 19
20 20 /* input_area and input_prompt must match in top border and margin for alignment */
21 21 div.input_prompt {
22 color: navy;
22 color: @input_prompt_color;
23 23 border-top: 1px solid transparent;
24 24 }
25 25
26 26 // The styles related to div.highlight are for nbconvert HTML output only. This works
27 27 // because the .highlight div isn't present in the live notebook. We could put this into
28 28 // nbconvert, but it easily falls out of sync, can't use our less variables and doesn't
29 29 // help the basic template when paired with our CSS.
30 30
31 31 div.input_area > div.highlight {
32 32 margin: @code_padding;
33 33 border: none;
34 34 padding: 0px;
35 35 background-color: transparent;
36 36 }
37 37
38 38 div.input_area > div.highlight > pre {
39 39 margin: 0px;
40 40 border: none;
41 41 padding: 0px;
42 42 background-color: transparent;
43 43 }
44 44
@@ -1,13 +1,13 b''
1 1 .notification_widget {
2 2 color: @navbar-default-link-color;
3 3 padding: 1px 12px;
4 4 margin: 2px 4px;
5 5 z-index: 10;
6 6 border: 1px solid #ccc;
7 7 border-radius: @border-radius-base;
8 background: rgba(240, 240, 240, 0.5);
8 background: @notification_widget_bg;
9 9
10 10 &.span {
11 11 padding-right:2px;
12 12 }
13 13 }
@@ -1,174 +1,174 b''
1 1 div.output_wrapper {
2 2 /* this position must be relative to enable descendents to be absolute within it */
3 3 position: relative;
4 4 .vbox()
5 5 }
6 6
7 7 /* class for the output area when it should be height-limited */
8 8 div.output_scroll {
9 9 /* ideally, this would be max-height, but FF barfs all over that */
10 10 height: 24em;
11 11 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
12 12 width: 100%;
13 13
14 14 overflow: auto;
15 15 .corner-all;
16 16 .box-shadow(inset 0 2px 8px rgba(0, 0, 0, .8));
17 17 display: block;
18 18 }
19 19
20 20 /* output div while it is collapsed */
21 21 div.output_collapsed {
22 22 margin: 0px;
23 23 padding: 0px;
24 24 .vbox();
25 25 }
26 26
27 27 div.out_prompt_overlay {
28 28 height: 100%;
29 29 padding: 0px @code_padding;
30 30 position: absolute;
31 31 .corner-all;
32 32 }
33 33
34 34 div.out_prompt_overlay:hover {
35 35 /* use inner shadow to get border that is computed the same on WebKit/FF */
36 36 .box-shadow(inset 0 0 1px #000);
37 37 background: rgba(240, 240, 240, 0.5);
38 38 }
39 39
40 40 div.output_prompt {
41 color: darkred;
41 color: @output_prompt_color;
42 42 }
43 43
44 44 /* This class is the outer container of all output sections. */
45 45 div.output_area {
46 46 padding: 0px;
47 47 page-break-inside: avoid;
48 48 .hbox();
49 49
50 50 .MathJax_Display {
51 51 // Inside a CodeCell, elements are left justified
52 52 text-align: left !important;
53 53 }
54 54
55 55 .rendered_html {
56 56 // Inside a CodeCell, elements are left justified
57 57 table {
58 58 margin-left: 0;
59 59 margin-right: 0;
60 60 }
61 61
62 62 img {
63 63 margin-left: 0;
64 64 margin-right: 0;
65 65 }
66 66 }
67 67 }
68 68
69 69 /* This is needed to protect the pre formating from global settings such
70 70 as that of bootstrap */
71 71 .output {
72 72 .vbox();
73 73 }
74 74
75 75 @media (max-width: 480px) {
76 76 // move prompts above output on small screens
77 77 div.output_area {
78 78 .vbox();
79 79 }
80 80 }
81 81
82 82 div.output_area pre {
83 83 margin: 0;
84 84 padding: 0;
85 85 border: 0;
86 86 vertical-align: baseline;
87 color: black;
87 color: @output_pre_color;
88 88 background-color: transparent;
89 89 .border-radius(0);
90 90 }
91 91
92 92 /* This class is for the output subarea inside the output_area and after
93 93 the prompt div. */
94 94 div.output_subarea {
95 95 padding: @code_padding @code_padding 0.0em @code_padding;
96 96 .box-flex1();
97 97 }
98 98
99 99 /* The rest of the output_* classes are for special styling of the different
100 100 output types */
101 101
102 102 /* all text output has this class: */
103 103 div.output_text {
104 104 text-align: left;
105 105 color: @text-color;
106 106 /* This has to match that of the the CodeMirror class line-height below */
107 107 line-height: @code_line_height;
108 108 }
109 109
110 110 /* stdout/stderr are 'text' as well as 'stream', but execute_result/error are *not* streams */
111 111 div.output_stream {
112 112 }
113 113
114 114 div.output_stdout {
115 115 }
116 116
117 117 div.output_stderr {
118 118 background: #fdd; /* very light red background for stderr */
119 119 }
120 120
121 121 div.output_latex {
122 122 text-align: left;
123 123 }
124 124
125 125 div.output_html {
126 126 }
127 127
128 128 div.output_png {
129 129 }
130 130
131 131 div.output_jpeg {
132 132 }
133 133
134 134 /* Empty output_javascript divs should have no height */
135 135 div.output_javascript:empty {
136 136 padding: 0;
137 137 }
138 138
139 139 .js-error {
140 140 color: darkred;
141 141 }
142 142
143 143 /* raw_input styles */
144 144
145 145 div.raw_input_container {
146 146 font-family: @font-family-monospace;
147 147 // for some reason, em padding doesn't compute the same for raw_input
148 148 // that is not the first input, but px does
149 149 padding-top: 5px;
150 150 }
151 151
152 152 span.raw_input_prompt {
153 153 /* nothing needed here */
154 154 }
155 155
156 156 input.raw_input {
157 157 font-family: inherit;
158 158 font-size: inherit;
159 159 color: inherit;
160 160 width: auto;
161 161 /* make sure input baseline aligns with prompt */
162 162 vertical-align: baseline;
163 163 /* padding + margin = 0.5em between prompt and cursor */
164 164 padding: 0em 0.25em;
165 165 margin: 0em 0.25em;
166 166 }
167 167
168 168 input.raw_input:focus {
169 169 box-shadow: none;
170 170 }
171 171
172 172 p.p-space {
173 173 margin-bottom: 10px;
174 174 }
@@ -1,86 +1,86 b''
1 1 .rendered_html {
2 2
3 3 color: @text-color;
4 4 em {font-style: italic;}
5 5 strong {font-weight: bold;}
6 6 u {text-decoration: underline;}
7 7 :link {text-decoration: underline;}
8 8 :visited {text-decoration: underline;}
9 9
10 10 // For a 14px base font size this goes as:
11 11 // font-size = 26, 22, 18, 14, 12, 12
12 12 // margin-top = 14, 14, 14, 14, 8, 8
13 13 h1 {font-size: 185.7%; margin: 1.08em 0 0 0; font-weight: bold; line-height: 1.0;}
14 14 h2 {font-size: 157.1%; margin: 1.27em 0 0 0; font-weight: bold; line-height: 1.0;}
15 15 h3 {font-size: 128.6%; margin: 1.55em 0 0 0; font-weight: bold; line-height: 1.0;}
16 16 h4 {font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0;}
17 17 h5 {font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0; font-style: italic;}
18 18 h6 {font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0; font-style: italic;}
19 19
20 20 // Reduce the top margins by 14px compared to above
21 21 h1:first-child {margin-top: 0.538em;}
22 22 h2:first-child {margin-top: 0.636em;}
23 23 h3:first-child {margin-top: 0.777em;}
24 24 h4:first-child {margin-top: 1em;}
25 25 h5:first-child {margin-top: 1em;}
26 26 h6:first-child {margin-top: 1em;}
27 27
28 28 ul {list-style:disc; margin: 0em 2em; padding-left: 0px;}
29 29 ul ul {list-style:square; margin: 0em 2em;}
30 30 ul ul ul {list-style:circle; margin: 0em 2em;}
31 31 ol {list-style:decimal; margin: 0em 2em; padding-left: 0px;}
32 32 ol ol {list-style:upper-alpha; margin: 0em 2em;}
33 33 ol ol ol {list-style:lower-alpha; margin: 0em 2em;}
34 34 ol ol ol ol {list-style:lower-roman; margin: 0em 2em;}
35 35 /* any extras will just be numbers: */
36 36 ol ol ol ol ol {list-style:decimal; margin: 0em 2em;}
37 37 * + ul {margin-top: 1em;}
38 38 * + ol {margin-top: 1em;}
39 39
40 40 hr {
41 color: black;
42 background-color: black;
41 color: @rendered_html_border_color;
42 background-color: @rendered_html_border_color;
43 43 }
44 44
45 45 pre {margin: 1em 2em;}
46 46
47 47 pre, code {
48 48 border: 0;
49 49 background-color: @body-bg;
50 50 color: @text-color;
51 51 font-size: 100%;
52 52 padding: 0px;
53 53 }
54 54
55 55 blockquote {margin: 1em 2em;}
56 56
57 57 table {
58 58 margin-left: auto;
59 59 margin-right: auto;
60 border: 1px solid black;
60 border: 1px solid @rendered_html_border_color;
61 61 border-collapse: collapse;
62 62 }
63 63 tr, th, td {
64 border: 1px solid black;
64 border: 1px solid @rendered_html_border_color;
65 65 border-collapse: collapse;
66 66 margin: 1em 2em;
67 67 }
68 68 td, th {
69 69 text-align: left;
70 70 vertical-align: middle;
71 71 padding: 4px;
72 72 }
73 73 th {font-weight: bold;}
74 74 * + table {margin-top: 1em;}
75 75
76 76 p {text-align: justify;}
77 77 * + p {margin-top: 1em;}
78 78
79 79 img {
80 80 display: block;
81 81 margin-left: auto;
82 82 margin-right: auto;
83 83 }
84 84 * + img {margin-top: 1em;}
85 85
86 86 }
@@ -1,14 +1,18 b''
1 1
2 2 // Our own variables for this page
3 3
4 4 @cell_selected_background: darken(@body-bg, 2%);
5 5 @cell_background: darken(@body-bg, 3.2%);
6 6 @border_color: darken(@cell_selected_background, 31%);
7 7 @light_border_color: darken(@cell_selected_background, 17%);
8 8 @border_width: 1px;
9 9 @notebook_font_size: 14px;
10 10 @notebook_line_height: 20px;
11 11 @code_line_height: 1.21429em; // changed from 1.231 to get 17px even
12 12 @code_padding: 0.4em; // 5.6 px
13 13 @notebook-shadow: inset 1px 4px 9px -6px rgba(0,0,0,.25);
14
14 @rendered_html_border_color: black;
15 @input_prompt_color: navy;
16 @output_prompt_color: darkred;
17 @output_pre_color: black;
18 @notification_widget_bg: rgba(240, 240, 240, 0.5);
General Comments 0
You need to be logged in to leave comments. Login now