Skip to content

Commit

Permalink
Remove some unused CSS styles and fix icon alignment in plugin list (j…
Browse files Browse the repository at this point in the history
…upyterlab#13255)

* Remove unused styles:

- `.jp-DirListing-deadSpace` unused since 10537f4
- `.jp-openJSONSettingsEditor` unused since jupyterlab@94cc691
- `.jp-OutputArea-stdin` unused since c7b8f41
- `.jp-PluginList .jp-SettingsHeader` unused since jupyterlab@6dc35da
- `.jp-PluginList-Searcher` unused since jupyterlab@3f65d55
- `.jp-RedirectForm` unused since jupyterlab@555d84b

* Fix abandoned style and lettercase typo in `jp-PluginList-entry-label`

Abandoned since jupyterlab@6b37ab4

* Remove unused `.lm-TabBar-WindowTabLabel` rule.

I could not find when it was removed from phosphor,
but it was introduced into JupyterLab in 2016 in:
652b8b5

* Remove unused style rules with no usage trace in git history

- `.jp-mimeType-highlight`: jupyterlab#11689 (comment)
- `.jp-Notebook-render *`:  jupyterlab#9382 (comment)
  • Loading branch information
krassowski authored Oct 18, 2022
1 parent c835a9a commit 1777055
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 99 deletions.
4 changes: 0 additions & 4 deletions packages/application/style/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@
margin-bottom: var(--jp-border-width);
}

.lm-TabBar-WindowTabLabel {
margin-top: 4px;
}

.lm-TabBar-tab.lm-mod-drag-image {
background: var(--jp-layout-color1);
border: var(--jp-border-width) solid var(--jp-border-color1);
Expand Down
1 change: 0 additions & 1 deletion packages/apputils-extension/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
|----------------------------------------------------------------------------*/

@import './notification.css';
@import './redirect.css';
@import './splash.css';
15 changes: 0 additions & 15 deletions packages/apputils-extension/style/redirect.css

This file was deleted.

9 changes: 0 additions & 9 deletions packages/filebrowser/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,6 @@
transform: translateX(-40%) translateY(-58%);
}

.jp-DirListing-deadSpace {
flex: 1 1 auto;
margin: 0;
padding: 0;
list-style-type: none;
overflow: auto;
background-color: var(--jp-layout-color1);
}

.jp-Document {
min-width: 120px;
min-height: 120px;
Expand Down
4 changes: 0 additions & 4 deletions packages/notebook/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
contain: strict;
}

.jp-Notebook-render * {
contain: none !important;
}

.jp-Notebook .jp-Cell {
overflow: visible;
}
Expand Down
6 changes: 0 additions & 6 deletions packages/outputarea/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,6 @@ body.lm-mod-override-cursor .jp-OutputArea-output.jp-mod-isolated::before {
| The Stdin output
|----------------------------------------------------------------------------*/

.jp-OutputArea-stdin {
line-height: var(--jp-code-line-height);
padding-top: var(--jp-code-padding);
display: flex;
}

.jp-Stdin-prompt {
color: var(--jp-content-font-color0);
padding-right: var(--jp-code-padding);
Expand Down
12 changes: 0 additions & 12 deletions packages/rendermime/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,3 @@ h6:hover .jp-InternalAnchorLink {
.jp-RenderedHTMLCommon > *:last-child {
margin-bottom: 0.5em;
}

.jp-mimeType-highlight {
background-color: var(
--jp-search-unselected-match-background-color
) !important;
color: var(--jp-search-unselected-match-color) !important;
}

.jp-mod-selected.jp-mimeType-highlight {
background-color: var(--jp-search-selected-match-background-color) !important;
color: var(--jp-search-selected-match-color) !important;
}
6 changes: 4 additions & 2 deletions packages/settingeditor/src/pluginlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class PluginList extends ReactWidget {
key={id}
title={itemTitle}
>
<div className="jp-pluginList-entry-label" role="tab">
<div className="jp-PluginList-entry-label" role="tab">
<div className="jp-SelectedIndicator" />
<LabIcon.resolveReact
icon={icon || (iconClass ? undefined : settingsIcon)}
Expand All @@ -409,7 +409,9 @@ export class PluginList extends ReactWidget {
tag="span"
stylesheet="settingsEditor"
/>
<span>{hightlightedTitle}</span>
<span className="jp-PluginList-entry-label-text">
{hightlightedTitle}
</span>
</div>
<ul>{filteredProperties}</ul>
</div>
Expand Down
50 changes: 4 additions & 46 deletions packages/settingeditor/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@
right: 0;
}

.jp-PluginList .jp-SettingsHeader {
display: flex;
flex-basis: 100%;
}

.jp-PluginList .jp-SettingsHeader button {
color: var(--jp-private-notebook-selected-color);
white-space: nowrap;
}

.jp-PluginList .jp-PluginList-header {
border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
border-top: var(--jp-border-width) solid var(--jp-border-color2);
Expand Down Expand Up @@ -143,11 +133,6 @@
color: var(--jp-brand-color1);
}

.jp-PluginList button span {
color: var(--jp-content-font-color1);
line-height: var(--jp-cell-collapser-min-height);
}

.jp-FormComponent li span {
overflow: hidden;
}
Expand All @@ -164,10 +149,6 @@
background-color: var(--jp-layout-color0);
}

.jp-PluginList-Searcher {
margin: 5px;
}

ul.jp-PluginList li.jp-mod-selected span.jp-PluginList-icon.jp-FileIcon {
background-image: var(--jp-icon-file-selected);
}
Expand Down Expand Up @@ -362,31 +343,6 @@ ul.jp-PluginList li.jp-mod-selected span.jp-PluginList-icon.jp-FileIcon {
margin: 2px;
}

.jp-openJSONSettingsEditor {
position: absolute;
bottom: 0;
left: 0;
}

.jp-openJSONSettingsEditor button {
border: 1px solid var(--jp-border-color1);
color: var(--jp-ui-font-color0);
padding: 5px;
margin: 5px;
cursor: pointer;
background-color: var(--jp-border-color2);
display: flex;
align-items: center;
}

.jp-openJSONSettingsEditor button > div {
display: flex;
}

.jp-openJSONSettingsEditor svg#icon {
height: 1.5em;
}

.jp-SettingsPanel .array-item {
border: 1px solid var(--jp-border-color2);
border-radius: 4px;
Expand Down Expand Up @@ -490,14 +446,16 @@ ul.jp-PluginList li.jp-mod-selected span.jp-PluginList-icon.jp-FileIcon {
text-overflow: ellipsis;
}

.jp-pluginList-entry-label {
.jp-PluginList-entry-label {
display: flex;
}

.jp-pluginList-entry-label span {
.jp-PluginList-entry-label-text {
text-overflow: ellipsis;
overflow-x: hidden;
white-space: nowrap;
color: var(--jp-content-font-color1);
line-height: var(--jp-cell-collapser-min-height);
}

.jp-SettingsPanel .jp-SettingsHeader-Name {
Expand Down

0 comments on commit 1777055

Please sign in to comment.