Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit afa31a2

Browse files
committed
UI: Fixed tab icon for Version Browser. CSS cleaning.
1 parent c48e9c0 commit afa31a2

File tree

2 files changed

+45
-67
lines changed

2 files changed

+45
-67
lines changed

src/widgets/history/widget.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { IHistoryModel } from "./model";
77
*/
88
const HISTORY_VIEWER_CLASS = "jp-HistoryViewer";
99

10-
export const HISTORY_VIEWER_ICON_CLASS = "jp-HistoryViewerIcon";
10+
export const HISTORY_VIEWER_ICON_CLASS = "jp-Toolbar-gatherbutton-HistoryIcon";
1111

1212
const REFERENCE_VERSION_CLASS = "jp-HistoryViewer-referenceversion";
1313

style/index.css

+44-66
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* STYLE VARIABLES
3+
*/
14
:root {
25
--brand-color4: #e3f2fd;
36
--brand-color3: #bbdefb;
@@ -7,7 +10,29 @@
710
}
811

912
/**
10-
* Gather button
13+
* ICONS
14+
*/
15+
/* From https://github.com/jupyterlab/jupyterlab/blob/master/packages/theme-light-extension/style/icons/jupyter/notebook.svg */
16+
.jp-Toolbar-gatherbutton-BookIcon {
17+
background-image: url("icons/notebook.svg");
18+
}
19+
20+
/* From https://github.com/jupyterlab/jupyterlab/blob/master/packages/theme-light-extension/style/icons/md/close.svg */
21+
.jp-Toolbar-gatherbutton-ClearIcon {
22+
background-image: url("icons/clear.svg");
23+
}
24+
25+
/* The following icons were generated from style/icons/icons.afdesign */
26+
.jp-Toolbar-gatherbutton-HistoryIcon {
27+
background-image: url("icons/history.svg");
28+
}
29+
30+
.jp-Toolbar-gatherbutton-CellsIcon {
31+
background-image: url("icons/cells.svg");
32+
}
33+
34+
/**
35+
* TOOLBAR BUTTONS
1136
*/
1237
.jp-Toolbar-gatherlabel {
1338
float: left;
@@ -51,29 +76,7 @@ span.jp-GatherLabel {
5176
}
5277

5378
/**
54-
* Button icons.
55-
*/
56-
/* From https://github.com/jupyterlab/jupyterlab/blob/master/packages/theme-light-extension/style/icons/jupyter/notebook.svg */
57-
.jp-Toolbar-gatherbutton-BookIcon {
58-
background-image: url('icons/notebook.svg');
59-
}
60-
61-
/* From https://github.com/jupyterlab/jupyterlab/blob/master/packages/theme-light-extension/style/icons/md/close.svg */
62-
.jp-Toolbar-gatherbutton-ClearIcon {
63-
background-image: url('icons/clear.svg');
64-
}
65-
66-
/* The following icons were generated from style/icons/icons.afdesign */
67-
.jp-Toolbar-gatherbutton-HistoryIcon {
68-
background-image: url('icons/history.svg');
69-
}
70-
71-
.jp-Toolbar-gatherbutton-CellsIcon {
72-
background-image: url('icons/cells.svg');
73-
}
74-
75-
/**
76-
* Clues for gatherable text.
79+
* VARIABLE HIGHLIGHTS
7780
*/
7881
.jp-InputArea-editor-nametext {
7982
font-weight: bold;
@@ -93,7 +96,7 @@ span.jp-GatherLabel {
9396
}
9497

9598
.jp-InputArea-editor-nameline-selected:after {
96-
content: '★';
99+
content: "★";
97100
position: absolute;
98101
right: 14px;
99102
font-weight: bold;
@@ -108,7 +111,7 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
108111
}
109112

110113
/**
111-
* Clues for gatherable results.
114+
* OUTPUT HIGHLIGHTS
112115
*/
113116
.jp-OutputArea-highlighted {
114117
border: 1px solid var(--brand-color3);
@@ -126,6 +129,9 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
126129
position: static;
127130
}
128131

132+
/**
133+
* WITHIN-CELL GATHER BUTTON
134+
*/
129135
.jp-OutputArea-highlighted:not(.jp-OutputArea-selected)
130136
.jp-OutputArea-gatherbutton {
131137
opacity: 0;
@@ -190,34 +196,16 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
190196
font-weight: bold;
191197
}
192198

193-
/* Gather tool buttons */
194-
.jp-OutputArea-child {
195-
overflow: visible;
196-
}
197-
198-
.jp-Notebook :not(.jp-mod-active).jp-Cell .jp-OutputPrompt {
199-
/* XXX: Don't make the prompt translucent; make just its text translucent, so the gather buttons
200-
can be opaque. */
201-
color: rgba(0, 0, 0, 0.32);
202-
opacity: 1;
203-
}
204-
205-
/* Notifications */
199+
/**
200+
* NOTIFICATIONS
201+
*/
206202
.jp-Toolbar-notification {
207203
margin-top: -2px;
208204
}
209205

210-
/* General PhosphorJS rules */
211-
.p-mod-hidden {
212-
display: none;
213-
}
214-
215-
.jp-HistoryViewerIcon {
216-
background-image: var(--jp-icon-history-viewer);
217-
background-size: 100%;
218-
}
219-
220-
/* Revision browser */
206+
/**
207+
* VERSION BROWSER
208+
*/
221209
.jp-HistoryViewer {
222210
width: 100%;
223211
height: 100%;
@@ -318,12 +306,6 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
318306
font-style: italic;
319307
}
320308

321-
/*
322-
.jp-DiffedCell-editor-aftertext {
323-
background-color: #fff1c6;
324-
}
325-
*/
326-
327309
.jp-DiffedCell-editor-aftertext.jp-DiffedCell-editor-changedtext {
328310
font-weight: bold;
329311
}
@@ -339,7 +321,6 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
339321

340322
.jp-DiffedCell-editor-beforetext.jp-DiffedCell-editor-changedtext {
341323
font-weight: bold;
342-
/* background-color: #99eaff; */
343324
background-color: #cbcbcb;
344325
}
345326

@@ -388,7 +369,7 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
388369

389370
.jp-Revision-button span.jp-Revision-button-label {
390371
margin-left: 6px;
391-
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
372+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
392373
white-space: nowrap;
393374
}
394375

@@ -398,12 +379,9 @@ div.CodeMirror-linebackground.jp-InputArea-editor-dependencyline {
398379
overflow-x: hidden;
399380
}
400381

401-
/* Output prompt (so we can show tool buttons) */
402-
.jp-OutputArea {
403-
overflow-y: visible;
404-
overflow: visible;
405-
}
406-
407-
.jp-OutputPrompt {
408-
overflow: visible;
382+
/**
383+
* MISCELLANEOUS
384+
*/
385+
.p-mod-hidden {
386+
display: none;
409387
}

0 commit comments

Comments
 (0)