Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let blink animation support style inheritance #545

Merged
merged 1 commit into from
Feb 15, 2017

Conversation

Martin1994
Copy link
Contributor

@Martin1994 Martin1994 commented Feb 14, 2017

With this change, blinking cursor will use the same font and background
color that set before, so that changing the style of cursor automatically applies to the animation.

Example:

In demo, change the background color to some light color and foreground color to some dark color, then enable blink:

#terminal-container .terminal {
    background-color: #ccc;
    color: #333;
    padding: 2px;
}

#terminal-container .xterm-viewport {
    background-color: #ccc;
}

#terminal-container .terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor {
    background-color: #333;
    color: #ccc;
}

#terminal-container .terminal:not(.focus) .terminal-cursor {
    outline: 1px solid #333;
    outline-offset: -1px;
    background-color: transparent;
}

cursorBlink off:

screen shot 2017-02-14 at 1 49 52 pm

Expected (and actual with this PR):

Actual (without this PR):

With this change, blinking cursor will use the same font and background
color that set before.
@Tyriar
Copy link
Member

Tyriar commented Feb 14, 2017

Can you provide some repro steps illustrating the problem? Is this if you're using a custom foreground color?

@Martin1994
Copy link
Contributor Author

Hi @Tyriar I've updated the repro steps.

@Tyriar
Copy link
Member

Tyriar commented Feb 15, 2017

Perfect, thanks for the contribution 😃

@Tyriar Tyriar merged commit fb2b10b into xtermjs:master Feb 15, 2017
@Tyriar Tyriar added this to the 2.4.0 milestone Feb 15, 2017
@Tyriar Tyriar self-assigned this Feb 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants