Skip to content

Commit

Permalink
Use setInterval/classes over animations for terminal cursor
Browse files Browse the repository at this point in the history
Part of #22900
  • Loading branch information
Tyriar committed Apr 3, 2017
1 parent 32e4e57 commit b3ba6ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 11 additions & 26 deletions src/vs/workbench/parts/terminal/electron-browser/media/xterm.css
Expand Up @@ -96,17 +96,10 @@
outline-offset: -1px;
}

.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-blink:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor,
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-blink:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor {
animation: cursor-blink 1.2s infinite step-end;
}

@keyframes cursor-blink {
0% {}
50% {
background-color: transparent;
color: inherit;
}
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-blink-on:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor,
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-blink-on:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor {
background-color: transparent;
color: inherit;
}

.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar .terminal-cursor,
Expand Down Expand Up @@ -140,29 +133,21 @@
right: 0;
height: 1px;
}
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before {
background-color: transparent;
}
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
animation: xterm-cursor-non-bar-blink 1.2s infinite step-end;
background-color: #333;
}
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
animation: xterm-cursor-non-bar-blink-dark 1.2s infinite step-end;
background-color: #ccc;
}
.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
animation: xterm-cursor-non-bar-blink-hc-black 1.2s infinite step-end;
}
@keyframes xterm-cursor-non-bar-blink {
0% { background-color: #333; }
50% { background-color: transparent; }
}
@keyframes xterm-cursor-non-bar-blink-dark {
0% { background-color: #ccc; }
50% { background-color: transparent; }
}
@keyframes xterm-cursor-non-bar-blink-hc-black {
0% { background-color: #fff; }
50% { background-color: transparent; }
background-color: #fff;
}

.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport {
Expand Down

0 comments on commit b3ba6ce

Please sign in to comment.