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

support darkmode #4036

Merged
merged 3 commits into from
May 7, 2020
Merged

support darkmode #4036

merged 3 commits into from
May 7, 2020

Conversation

fujiisoup
Copy link
Member

@fujiisoup fujiisoup commented May 6, 2020

Now it looks like
image

I'm pretty sure that this workaround is not the best (maybe the second worst), as it only supports the dark mode of vscode but not other environments.

I couldn't find a good way to make a workaround for the general dark-mode.
Any advice is welcome.

@fujiisoup
Copy link
Member Author

Added a style for colab darkmode according to
googlecolab/colabtools/issues/1214
and now it works also in colab dark theme :)
image

If no further comments, I'll merge this in a day.

@fujiisoup fujiisoup merged commit 69548df into pydata:master May 7, 2020
@fujiisoup fujiisoup deleted the html_darkmode branch May 7, 2020 20:36
@shoyer
Copy link
Member

shoyer commented May 7, 2020

Thanks @fujiisoup! Hopefully it's not too hard to add support for dark mode in other editors using a similar approach.

dcherian added a commit to kmuehlbauer/xarray that referenced this pull request May 9, 2020
…k-issues

* upstream/master: (22 commits)
  support darkmode (pydata#4036)
  Use literal syntax instead of function calls to create the data structure (pydata#4038)
  Add template xarray object kwarg to map_blocks (pydata#3816)
  Transpose coords by default (pydata#3824)
  Remove broken test for Panel with to_pandas() (pydata#4028)
  Allow warning with cartopy in docs plotting build (pydata#4032)
  Support overriding existing variables in to_zarr() without appending (pydata#4029)
  chore: Remove unnecessary comprehension (pydata#4026)
  fix to_netcdf docstring typo (pydata#4021)
  Pint support for DataArray (pydata#3643)
  Apply blackdoc to the documentation (pydata#4012)
  ensure Variable._repr_html_ works (pydata#3973)
  Fix handling of abbreviated units like msec (pydata#3998)
  full_like: error on non-scalar fill_value (pydata#3979)
  Fix some code quality and bug-risk issues (pydata#3999)
  DOC: add pandas.DataFrame.to_xarray (pydata#3994)
  Better chunking error messages for zarr backend (pydata#3983)
  Silence sphinx warnings (pydata#3990)
  Fix distributed tests on upstream-dev (pydata#3989)
  Add multi-dimensional extrapolation example and mention different behavior of kwargs in interp (pydata#3956)
  ...
@weiji14
Copy link
Contributor

weiji14 commented May 21, 2020

This looks awesome! Is it possible to port this to the Atom editor as well? This is what it looks like currently on the 'One Dark' Atom editor theme:

xarray_on_atom_editor_dark_mode

@shoyer
Copy link
Member

shoyer commented May 21, 2020

If you can figure out the names of the style variables Atom uses to identify dark mode, it should be pretty easy to add support.

@weiji14
Copy link
Contributor

weiji14 commented May 21, 2020

Cool, there doesn't seem to be an easy [theme=dark] solution (at least from my poor CSS knowledge), so I've posted a question on the Atom forums at https://discuss.atom.io/t/how-to-detect-dark-theme-on-atom/74937 to ask.

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.

small contrast of html view in VScode darkmode
3 participants