base16-syntax icon indicating copy to clipboard operation
base16-syntax copied to clipboard

I-beam cursor should auto-switch between black/white on MacOS

Open swrobel opened this issue 9 years ago • 2 comments

Atom added a mixin that automatically switches the I-beam cursor from black to white & back based on the background color of the theme, but for whatever reason, it doesn't work with this syntax theme unless you're running Atom in developer mode. It seems to stick with whatever color cursor matched the syntax theme that was selected when atom started up (white if you were on a dark theme, black if you were on a light theme) regardless of how much you change it. Reloading the window is necessary to get the cursor to change color.

Perhaps @lee-dohm can help out since he created the mixin.

Here's a screen recording to illustrate the incorrect behavior with this theme: base16-old

Here's a screen recording to illustrate the correct behavior with built-in themes: base16-new

swrobel avatar Apr 29 '16 01:04 swrobel

The white-cursor support is in the cursors.less file in Atom:

https://github.com/atom/atom/blob/master/static/cursors.less

To my understanding, when the theme is changed, Atom does something to reinitialize the styles loaded in the DOM. This package probably doesn't do whatever that is when swapping between the light and dark backgrounds.

lee-dohm avatar Apr 29 '16 01:04 lee-dohm

Thank you for the detailed report, and the pointer. I can confirm this issue is not limited to MacOS, I can duplicate it on Windows too. I'll take a look to see if I can find (and fix) the problem.

Alchiadus avatar Apr 29 '16 17:04 Alchiadus