-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
Copy pathbase.css
263 lines (220 loc) · 6.43 KB
/
base.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
|
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
@import './variables.css';
/**
Document oriented look for the notebook.
This includes changes to the look and feel of the JupyterLab Notebook
component like:
- scrollbar to the right of the page
- drop shadow on the notebook
- smaller empty space at the bottom of the notebook
- compact view on mobile
*/
/* Keep the notebook centered on the page */
body[data-notebook='notebooks'] .jp-NotebookPanel-toolbar {
padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
padding-right: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
}
body[data-notebook='notebooks'] .jp-Notebook {
padding-top: unset;
padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
padding-right: calc(
calc(
100% - var(--jp-notebook-max-width) - var(--jp-notebook-padding-offset)
) * 0.5
);
background: var(--jp-layout-color2);
}
body[data-notebook='notebooks'] .jp-WindowedPanel-inner {
margin-top: var(--jp-notebook-toolbar-margin-bottom);
}
body[data-notebook='notebooks'] .jp-Notebook-cell {
background: var(--jp-layout-color0);
padding-left: calc(2 * var(--jp-cell-padding));
padding-right: calc(2 * var(--jp-cell-padding));
}
/* Empty space at the bottom of the notebook (similar to classic) */
body[data-notebook='notebooks'] .jp-Notebook.jp-mod-scrollPastEnd::after {
min-height: 100px;
}
/* Fix background colors */
body[data-notebook='notebooks'] .jp-Notebook > * {
background: var(--jp-layout-color0);
}
body[data-notebook='notebooks']
.jp-Notebook.jp-mod-commandMode
.jp-Cell.jp-mod-active.jp-mod-selected:not(.jp-mod-multiSelected) {
background: var(--jp-layout-color0) !important;
}
/**
Extra padding to the first and and last cell of the notebook.
TODO: revisit when https://github.com/jupyterlab/jupyterlab/issues/13151 is fixed
*/
.jp-Notebook-cell[data-windowed-list-index='0'] {
padding-top: calc(2 * var(--jp-notebook-padding));
}
body[data-notebook='notebooks'] .jp-WindowedPanel-window > *:last-child {
padding-bottom: calc(2 * var(--jp-notebook-padding));
}
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::before {
content: ' ';
height: 100%;
position: absolute;
top: 0;
width: 11px;
}
/* Cell toolbar adjustements */
body[data-notebook='notebooks'] .jp-cell-toolbar {
background: unset;
box-shadow: unset;
}
body[data-notebook='notebooks']
.jp-RawCell[data-windowed-list-index='0']
.jp-cell-toolbar,
body[data-notebook='notebooks']
.jp-MarkdownCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: calc(2 * var(--jp-notebook-padding));
}
/** first code cell on mobile
(keep the selector above the media query)
*/
body[data-notebook='notebooks']
.jp-CodeCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: unset;
}
@media only screen and (max-width: 760px) {
/* first code cell on mobile */
body[data-notebook='notebooks']
.jp-CodeCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: var(--jp-notebook-padding);
}
body[data-notebook='notebooks'] .jp-MarkdownCell .jp-cell-toolbar,
body[data-notebook='notebooks'] .jp-RawCell .jp-cell-toolbar {
top: calc(0.5 * var(--jp-notebook-padding));
}
}
/* Mobile View */
body[data-format='mobile'] .jp-NotebookCheckpoint {
display: none;
}
body[data-format='mobile'] .jp-Notebook > *:first-child {
margin-top: 0;
}
/* Virtual Notebook fixes */
body[data-notebook='notebooks'] .jp-WindowedPanel-window {
background: var(--jp-layout-color0);
/* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13154 is released */
width: unset;
}
body[data-notebook='notebooks'] .jp-WindowedPanel-inner {
/* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13157 is released */
width: unset;
}
/* Notebook box shadow */
body[data-notebook='notebooks'] .jp-Notebook > *:first-child:not(:last-child) {
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks'] .jp-Notebook > *:first-child:not(:last-child) {
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks']
.jp-Notebook
> *:first-child:last-child::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::after,
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::before {
content: ' ';
height: 100%;
position: absolute;
top: 0;
width: 11px;
}
/* Additional customizations of the components on the notebook page */
.jp-NotebookKernelLogo {
flex: 0 0 auto;
display: flex;
align-items: center;
text-align: center;
margin-right: 8px;
}
.jp-NotebookKernelLogo img {
max-width: 28px;
max-height: 28px;
display: flex;
}
.jp-NotebookKernelStatus {
margin: 0;
font-weight: normal;
font-size: var(--jp-ui-font-size1);
color: var(--jp-ui-font-color0);
font-family: var(--jp-ui-font-family);
line-height: var(--jp-private-title-panel-height);
padding-left: var(--jp-kernel-status-padding);
padding-right: var(--jp-kernel-status-padding);
}
.jp-NotebookKernelStatus-error {
background-color: var(--jp-error-color0);
}
.jp-NotebookKernelStatus-warn {
background-color: var(--jp-warn-color0);
}
.jp-NotebookKernelStatus-info {
background-color: var(--jp-info-color0);
}
.jp-NotebookKernelStatus-fade {
animation: 0.5s fade-out forwards;
}
@keyframes fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
#jp-title h1 {
cursor: pointer;
font-size: 18px;
margin: 0;
font-weight: normal;
color: var(--jp-ui-font-color0);
font-family: var(--jp-ui-font-family);
line-height: calc(1.5 * var(--jp-private-title-panel-height));
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
#jp-title h1:hover {
background: var(--jp-layout-color2);
}
.jp-NotebookCheckpoint {
font-size: 14px;
margin-left: 5px;
margin-right: 5px;
font-weight: normal;
color: var(--jp-ui-font-color0);
font-family: var(--jp-ui-font-family);
line-height: calc(1.5 * var(--jp-private-title-panel-height));
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}