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