Debian Codegraph @

packages/notebook-extension/style/base.css

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