Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ace9ec9

Browse files
committed
fix: text selection in active xterms for light themes is not visible
Fixes #4087
1 parent 077c747 commit ace9ec9

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

plugins/plugin-bash-like/web/css/static/xterm.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,8 @@ disabled see https://github.com/IBM/kui/issues/3939
271271
.xterm-container .xterm-viewport::-webkit-scrollbar {
272272
background-color: transparent !important;
273273
}
274+
275+
/* selection */
276+
[kui-theme-style="light"] .xterm-container .xterm-screen .xterm-selection div {
277+
background-color: rgba(0, 0, 0, 0.3);
278+
}

plugins/plugin-carbon-themes/web/css/carbon-gray10.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ body[kui-theme="Carbon Gray10"] {
114114

115115
--color-brand-03: #008fff;
116116
--color-content-divider: #bfc0c2;
117-
--color-selection-background: #b3e6ff;
118117

119118
--color-stripe-01: var(--color-base03);
120119
--color-stripe-02: #f5f7fa;

plugins/plugin-carbon-themes/web/css/carbon-gray90.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ body[kui-theme="Carbon Gray90"][kui-theme-style] {
3737
--color-brand-03: #408bfc;
3838
--color-content-divider: #4c4c4c;
3939

40-
--color-selection-background: #6f6f6f;
41-
4240
--color-stripe-01: var(--color-base02);
4341
--color-stripe-02: var(--color-sidecar-header);
4442
--tab-gray-text-color: #b5b5b5;

plugins/plugin-client-common/web/css/static/ui.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
}
44
::selection {
55
background-color: var(--color-selection-background);
6-
color: var(--color-selection-foreground);
76
}
87
html,
98
body[kui-theme-style],
@@ -1382,9 +1381,6 @@ body {
13821381
--color-text-01: var(--color-base06);
13831382
--color-text-02: var(--color-base04);
13841383

1385-
--color-selection-background: var(--color-base04);
1386-
--color-selection-foreground: var(--color-text-01);
1387-
13881384
--color-ok: var(--color-green);
13891385
--color-error: var(--color-red);
13901386
--color-warning: var(--color-base09);
@@ -1429,6 +1425,18 @@ body {
14291425

14301426
/* repl background */
14311427
--color-repl-background: var(--color-ui-01);
1428+
1429+
/* text selection */
1430+
--color-selection-background-dark: rgba(255, 255, 255, 0.3);
1431+
--color-selection-background-light: rgba(0, 0, 0, 0.3);
1432+
}
1433+
body[kui-theme-style="dark"],
1434+
body[kui-theme-style="light"] .kui--inverted-color-context {
1435+
--color-selection-background: var(--color-selection-background-dark);
1436+
}
1437+
body[kui-theme-style="light"],
1438+
body[kui-theme-style="dark"] .kui--inverted-color-context {
1439+
--color-selection-background: var(--color-selection-background-light);
14321440
}
14331441

14341442
.color-base08 {

plugins/plugin-core-themes/web/css/dark.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ body[kui-theme="Dark"] {
3333
--color-sidecar-toolbar-background: #d7dce3;
3434
--color-sidecar-toolbar-foreground: var(--color-base02);
3535

36-
--color-selection-background: var(--color-base05);
37-
3836
--color-brand-03: #418cff;
3937
--color-tag-beta-fill: #202529;
4038
--color-tag-beta-text: var(--color-text-01);

plugins/plugin-core-themes/web/css/light.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ body[kui-theme="Light"] {
101101
--color-sidecar-border: #e4e4e4;
102102

103103
--color-brand-03: #008fff;
104-
--color-selection-background: #b3e6ff;
105104

106105
--color-confirm-background: var(--color-base00);
107106
--color-confirm-foreground: var(--color-base05);

plugins/plugin-editor/web/css/static/theme-alignment.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
transition: box-shadow 300ms ease-in-out;
1111
}
1212

13-
[kui-theme-style] .monaco-editor .selected-text {
14-
opacity: 0.3; /* i don't know why the selection outside of monaco is different, despite using the same CSS styling */
15-
}
16-
1713
[kui-theme-style] .monaco-editor {
1814
transition: color 300ms ease-in-out;
1915
color: var(--color-text-01);

0 commit comments

Comments
 (0)