Skip to content

Commit

Permalink
Merge pull request #928 from krassowski/fix-mark-highlight-in-dark-mode
Browse files Browse the repository at this point in the history
Fix contrast of mark highlights in dark mode
  • Loading branch information
krassowski authored Apr 17, 2023
2 parents 08b6afb + 7cf24a9 commit 661b743
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/jupyterlab-lsp/style/signature.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.lsp-signature-help pre code {
.lsp-signature-help code {
font-size: var(--jp-code-font-size);
}

.lsp-signature-help code > mark {
color: var(--jp-lsp-signature-mark-color);
background: var(--jp-lsp-signature-mark-background);
}

.lsp-signature-help code > mark > span {
/* override syntax highlight colour to ensure contrast */
color: var(--jp-lsp-signature-mark-color) !important;
}
3 changes: 3 additions & 0 deletions packages/jupyterlab-lsp/style/variables/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
/* hover */
--jp-editor-mirror-lsp-hover-decoration-style: dotted;
--jp-editor-mirror-lsp-hover-decoration-color: var(--jp-brand-color1);
/* signature */
--jp-lsp-signature-mark-color: black;
--jp-lsp-signature-mark-background: yellow;
}
5 changes: 5 additions & 0 deletions packages/jupyterlab-lsp/style/variables/jupyterlab-dark.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
body[data-jp-theme-light='false'] .cm-s-jupyter {
--jp-editor-mirror-lsp-highlight-background-color: rgba(151, 173, 255, 0.3);
}

body[data-jp-theme-light='false'] {
--jp-lsp-signature-mark-color: white;
--jp-lsp-signature-mark-background: #607e01;
}

0 comments on commit 661b743

Please sign in to comment.