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

Commit 75a3efe

Browse files
committed
fix: prompt text alignment issues
Fixes #4368
1 parent 516b976 commit 75a3efe

File tree

4 files changed

+52
-47
lines changed

4 files changed

+52
-47
lines changed

plugins/plugin-carbon-themes/web/scss/ibm-plex.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ $font-prefix: '~@ibm/plex';
99
@import '~@ibm/plex/scss/sans/regular/index';
1010
@import '~@ibm/plex/scss/sans/light/index';
1111

12-
@import '~@ibm/plex/scss/sans-condensed/medium/index';
13-
1412
body.kui--alternate[kui-theme-style] {
1513
--font-monospace: 'IBM Plex Mono';
1614
--font-sans-serif: 'IBM Plex Sans';

plugins/plugin-carbon-themes/web/scss/kui--alternate.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ body.kui--alternate {
66
padding-right: calc(1em * 0.875);
77
}
88

9-
.repl-input:not(.kui--isearch-active) .repl-prompt {
10-
font-family: 'IBM Plex Sans Condensed';
11-
}
129
.repl-context {
1310
filter: none;
1411
color: var(--color-text-02);

plugins/plugin-client-common/src/components/Views/Terminal/Block/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default class Input extends React.PureComponent<Props, State> {
135135
private promptRight() {
136136
// &#x2771; "heavy right-pointing angle bracket ornament"
137137
// another option: &#x276f; "heavy right-pointing angle quotation mark ornament"
138-
return <span className="repl-prompt-righty">&#x276f;</span>
138+
return <span className="repl-prompt-righty">/</span>
139139
}
140140

141141
private isearchPrompt() {

plugins/plugin-client-common/web/css/static/repl.scss

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,59 @@
1919
.repl.sidecar-visible p {
2020
white-space: normal;
2121
}
22-
.repl-prompt {
23-
margin-right: 0.1875em;
24-
--color-prompt-text: var(--color-brand-02);
25-
--color-prompt-background: transparent;
26-
color: var(--color-prompt-text);
27-
}
28-
.repl-input:not(.kui--isearch-active) .repl-prompt {
29-
font-weight: 500;
30-
font-family: var(--font-sans-serif);
31-
}
32-
.repl-prompt .repl-selection {
33-
font-size: 80%;
34-
opacity: 0.6;
35-
}
36-
.repl-prompt .repl-selection.has-selection-true {
37-
margin-left: 1ex;
38-
}
39-
.repl-context {
40-
background-color: var(--color-prompt-background);
41-
letter-spacing: 0.16px;
42-
filter: opacity(0.6875) grayscale(50%);
43-
}
44-
/*.repl-block.using-custom-prompt .repl-prompt-righty > svg,
22+
.repl {
23+
.repl-prompt {
24+
font-size: 0.875em;
25+
margin-right: 0.25em;
26+
--color-prompt-text: var(--color-brand-02);
27+
--color-prompt-background: transparent;
28+
color: var(--color-prompt-text);
29+
}
30+
.repl-input:not(.kui--isearch-active) .repl-prompt {
31+
font-weight: 500;
32+
font-family: var(--font-sans-serif);
33+
}
34+
.repl-prompt .repl-selection {
35+
font-size: 80%;
36+
opacity: 0.6;
37+
}
38+
.repl-prompt .repl-selection.has-selection-true {
39+
margin-left: 1ex;
40+
}
41+
.repl-context {
42+
background-color: var(--color-prompt-background);
43+
letter-spacing: 0.16px;
44+
filter: grayscale(20%);
45+
}
46+
/*.repl-block.using-custom-prompt .repl-prompt-righty > svg,
4547
.repl-block.using-custom-prompt .repl-prompt-righty > i,
4648
.repl-block.using-custom-prompt .repl-context {
4749
display: none;
4850
}*/
49-
.repl-prompt-righty .repl-temporary {
50-
display: flex;
51-
align-items: center;
52-
}
51+
.repl-prompt-righty {
52+
font-weight: 700;
53+
text-shadow: 0 0 1px var(--color-text-02);
54+
}
5355

54-
/* repl right-hand decorations */
55-
.repl-prompt-right-elements {
56-
display: flex;
57-
align-items: center;
58-
flex: 0;
59-
white-space: nowrap;
60-
margin-left: 1em;
61-
}
62-
.kui--repl-prompt-buttons {
63-
margin-right: 1em;
64-
}
65-
.kui--repl-prompt-buttons .graphical-icon {
66-
opacity: 0.0375;
56+
.repl-prompt-righty .repl-temporary {
57+
display: flex;
58+
align-items: center;
59+
}
60+
61+
/* repl right-hand decorations */
62+
.repl-prompt-right-elements {
63+
display: flex;
64+
align-items: center;
65+
flex: 0;
66+
white-space: nowrap;
67+
margin-left: 1em;
68+
}
69+
.kui--repl-prompt-buttons {
70+
margin-right: 1em;
71+
}
72+
.kui--repl-prompt-buttons .graphical-icon {
73+
opacity: 0.0375;
74+
}
6775
}
6876
.repl-block .repl-input:hover .kui--repl-prompt-buttons .graphical-icon {
6977
opacity: 0.25;
@@ -129,6 +137,9 @@ body/*:not(.sidecar-full-screen)*/ repl.sidecar-visible .repl-selection, body/*.
129137
white-space: nowrap;
130138
/* text-overflow: ellipsis; see https://github.com/IBM/kui/issues/3539 */
131139
}
140+
.repl-block:not(.repl-active) .repl-input-element {
141+
color: var(--color-text-02);
142+
}
132143
.kui--prompt-like:empty {
133144
border-right: 1ex solid var(--color-caret);
134145
}
@@ -278,7 +289,6 @@ body/*:not(.sidecar-full-screen)*/ repl.sidecar-visible .repl-selection, body/*.
278289
.bx--inline-loading__text {
279290
color: var(--color-text-02);
280291
font-size: 0.75em;
281-
opacity: 0.75;
282292
order: -1;
283293
margin-right: 0.875em;
284294
}

0 commit comments

Comments
 (0)