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

Text Editor Cursor invisible in Content Dark mode of chrome #7446

Open
leon90dm opened this issue Oct 30, 2019 · 4 comments
Open

Text Editor Cursor invisible in Content Dark mode of chrome #7446

leon90dm opened this issue Oct 30, 2019 · 4 comments

Comments

@leon90dm
Copy link

Description

Text Editor Cursor is invisible in Content Dark mode of chrome or the cursor is as dark
as the editing dark cell background.
Because it is OK in chrome's Content Light mode.

Reproduce

  1. Turn Juypterlab's theme into Dark Mode
  2. Turn on chrome's content dark mode, navigate to "chrome://flags" and search 'Dark'
    and Enable "Force Dark Mode for Web Contents" , this operation require relaunch chrome.
  3. After Relaunch, open jupyterlab again, edit any cell, cursor's missing.

Expected behavior

expecting white color cursor when editing in cell.

Context

  • chrome 78.0.3904.70
  • macos 10.14.6
  • jupyterlab 1.1.4
  • Operating System and version:
  • Browser and version:
  • JupyterLab version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.
@mvonpohle
Copy link

I too am having this exact same issue.

@hot9cups
Copy link

2 years late, but did you ever find a solution to this?

@vitchyr
Copy link

vitchyr commented Oct 12, 2021

I'm also having this issue. @leon90dm did you ever find a solution to this?

@bjodah
Copy link

bjodah commented May 12, 2022

This is what I run close to the top of my notebook to facilitate dark mode:

%%javascript
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
    <!--- Avoid blinding white background in Matplotlib plots when using dark mode-->
    IPython.notebook.kernel.execute("plt.style.use('dark_background')");
    <!--- Text cursor is pretty much invisible in dark mode, make it light green --->
    var stylesheet = document.styleSheets[0]
    
    stylesheet.insertRule(".CodeMirror-cursor {\
  border-left: 1px solid #15ca1a !important;\
  background: #15ca1a;\
  width: 2px !important;\
}");
}

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

No branches or pull requests

5 participants