Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 6dccbf8

Browse files
committed
Change prompt decoration in history search mode.
1 parent b765f14 commit 6dccbf8

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

images/prompt-decoration.svg

+3
Loading
Loading

src/views/PromptComponent.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ export class PromptComponent extends React.Component<Props, State> {
126126
render() {
127127
return (
128128
<div className="prompt" data-mode={this.state.mode}>
129-
<div className="prompt-decoration">
130-
<div className="square"/>
131-
<div className="square rhombus"/>
132-
</div>
133129
<div className="prompt-content" ref="prompt-content"/>
134130
</div>
135131
);

src/views/index.html

+10-17
Original file line numberDiff line numberDiff line change
@@ -300,33 +300,26 @@
300300
grid-template-columns: calc(var(--prompt-font-size) * 2) auto;
301301
}
302302

303+
.session .prompt[data-mode=history-search] {
304+
grid-template-columns: calc(var(--prompt-font-size) * 8) auto;
305+
}
306+
303307
.session[data-status=in-progress] .prompt {
304308
opacity: 0;
305309
pointer-events: none;
306310
}
307311

308-
.session .prompt-decoration {
309-
--decoration-height: calc(var(--prompt-font-size) * 1.3);
312+
.session .prompt:before {
310313
grid-area: prompt-decoration;
311-
position: relative;
312-
overflow: hidden;
313-
height: var(--decoration-height);
314-
z-index: 2;
314+
filter: brightness(50%);
315315
}
316316

317-
.session .prompt-decoration .square {
318-
position: absolute;
319-
display: inline-block;
320-
width: var(--decoration-height);
321-
height: var(--decoration-height);
322-
background-color: var(--text-color);
323-
z-index: 1;
324-
filter: brightness(50%);
317+
.session .prompt[data-mode=normal]:before {
318+
content: url("../../../images/prompt-decoration.svg");
325319
}
326320

327-
.session .prompt-decoration .rhombus {
328-
left: calc(var(--decoration-height) * 0.39);
329-
transform: rotate(45deg);
321+
.session .prompt[data-mode=history-search]:before {
322+
content: url("../../../images/prompt-history-mode-decoration.svg");
330323
}
331324

332325
.session .prompt-content {

0 commit comments

Comments
 (0)