Skip to content

Commit 24ab202

Browse files
Use more CSS variables from JupyterLab (#86)
* Use more CSS variables from JupyterLab * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2897c4f commit 24ab202

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

src/linkPanel/widgets/linking.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ namespace Private {
517517
return (
518518
<Button
519519
onClick={props.glueCallback}
520-
minimal
521520
disabled={disabledStatus ?? true}
522521
className={'glue-LinkEditor-linkingGlueButton'}
523522
>

style/base.css

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999

100100
.glue-Session-tabBar .lm-TabBar-tab.glue-LinkEditor-tab {
101101
flex: none;
102+
color: var(--jp-ui-inverse-font-color0);
102103
background-color: var(--jp-brand-color1);
103104
}
104105

@@ -108,7 +109,18 @@
108109
}
109110

110111
.glue-Session-tabBar .lm-TabBar-tab.lm-mod-current.glue-LinkEditor-tab {
111-
background: var(--jp-brand-color2);
112+
color: var(--jp-ui-font-color0);
113+
background: var(--jp-brand-color3);
114+
}
115+
116+
.glue-Session-tabBar .lm-TabBar-tab.lm-mod-current::before {
117+
position: absolute;
118+
top: calc(-1 * var(--jp-border-width) + 1px);
119+
left: calc(-1 * var(--jp-border-width));
120+
content: '';
121+
height: var(--jp-private-horizontal-tab-active-top-border);
122+
width: calc(100% + 2 * var(--jp-border-width));
123+
background: var(--jp-brand-color1);
112124
}
113125

114126
.grid-panel {
@@ -235,8 +247,8 @@
235247
}
236248

237249
.glue-LinkEditor-linkingItem.selected {
238-
background-color: var(--jp-brand-color4);
239-
color: var(--jp-content-link-color);
250+
color: var(--jp-ui-inverse-font-color1);
251+
background-color: var(--jp-brand-color1);
240252
}
241253

242254
.glue-LinkEditor-summary table {
@@ -312,10 +324,8 @@
312324

313325
.glue-LinkEditor-linkingGlueButton {
314326
height: 30px;
315-
}
316-
317-
.glue-LinkEditor-linkingGlueButton:hover {
318-
background-color: var(--jp-layout-color4) !important;
327+
background-color: var(--jp-brand-color1);
328+
color: var(--jp-ui-inverse-font-color1);
319329
}
320330

321331
.glue-LinkEditor-content {
@@ -400,7 +410,7 @@
400410
}
401411

402412
.glue-SpinnerContent {
403-
border: solid #f376269e;
413+
border: solid var(--jp-jupyter-icon-color);
404414
margin: 50px auto;
405415
text-indent: -9999em;
406416
width: 6em;
@@ -417,7 +427,7 @@
417427
height: 50%;
418428
background: #f3762605;
419429
border-radius: 100% 0 100% 0;
420-
box-shadow: inset 6px 5px 0 1px #f37626;
430+
box-shadow: inset 6px 5px 0 1px var(--jp-jupyter-icon-color);
421431
position: absolute;
422432
top: 0;
423433
left: 0;
@@ -475,14 +485,18 @@
475485
box-shadow: var(--jp-elevation-z20);
476486
}
477487

478-
body[data-jp-theme-light='true'] {
479-
--glue-activated: #c6d4e2;
488+
.grid-selected .glue-Session-tab-toolbar {
489+
background: var(--jp-brand-color1);
490+
color: var(--jp-ui-inverse-font-color0);
480491
}
481492

482-
body[data-jp-theme-light='false'] {
483-
--glue-activated: #2d3c4a;
493+
.grid-selected
494+
.glue-Session-tab-toolbar
495+
.jp-ToolbarButtonComponent
496+
.jp-icon3[fill] {
497+
fill: var(--jp-ui-inverse-font-color0);
484498
}
485499

486-
.grid-selected .glue-Session-tab-toolbar {
487-
background: var(--glue-activated);
500+
.grid-selected .glue-Session-tab-toolbar .jp-Button.jp-mod-minimal:hover {
501+
background-color: var(--jp-brand-color1) !important;
488502
}

0 commit comments

Comments
 (0)