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

Chrome date input icon not compatible with dark mode #237

Open
kgoo124 opened this issue Aug 19, 2020 · 1 comment
Open

Chrome date input icon not compatible with dark mode #237

kgoo124 opened this issue Aug 19, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@kgoo124
Copy link
Member

kgoo124 commented Aug 19, 2020

Actual behavior
The icon disappears but can be still be clicked and used

Expected behavior
The icon should be visible in dark mode

To Reproduce
Steps to reproduce the behavior:

  1. Start in JupyterLab light mode
  2. Open a csv file in our Tabular Data Editor
  3. Make sure a single column has all cells filled with dates (formatted: YYYY-MM-DD)
  4. Toggle on data detection (a calendar icon should appear at the top of the columns with dates)
  5. Double-click on a date to edit it and see the icon pop up
  6. Switch to JupyterLab dark mode
  7. Double-click on a date to edit it and see the icon hidden (can still click on the icon and use as normal)

Screenshots
Screen Shot 2020-08-19 at 12 15 16 PM

Desktop (please complete the following information):

  • OS: Mac Catalina
  • Browser: Chrome 84.0.4147.125

Additional context

  • Problem is with Chrome's native HTML date input element. You can't change the color of the icon, thus in dark mode the icon becomes hidden.
@kgoo124 kgoo124 added the bug Something isn't working label Aug 19, 2020
@kgoo124
Copy link
Member Author

kgoo124 commented Aug 28, 2020

One possible option is toggle css styling when switching from light to dark mode. The code below inverts the calendar color resulting in a white icon. This seems a little hacky though.

input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant