-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
small contrast of html view in VScode darkmode #4024
Comments
It is how it looks like in Light mode Here is the css definition xarray/xarray/static/css/style.css Lines 5 to 14 in 59b470f
It looks like that |
It looks that Pandas is taking a very different approach and codebase and I don't think it is easy to adapt their approach... I am not familiar with the css staff in jupyter but the simplest approach may be just to disable the text- and background-coloring but use the default color only. |
It looks like there may be some standard ways to detect dark vs light mode in CSS? I'm not sure if those work in IDEs like VSCode and Google Colab, though. |
VS Code will tell you if it is in "dark" "light" or "high contrast" modes https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content Looks like there is an upstream issue which might prevent getting the actual theme colors in some situations: https://github.com/microsoft/vscode-python/issues/9597 For my own stuff in VS Code, I usually disable the HTML repr in those notebooks. |
Thanks, @shoyer and @DocOtak for the suggestions.
It looks not working in vscode...
In #4036 I used body.vscode-dark {
} code block, but maybe more general solution would be better if available... |
If using xarray inside VScode with darkmode, the new html repr has a small contrast of the text color and background.
Maybe the text color comes from the default setting, but the background color is not.
In light mode, it looks nice.
Versions
Output of xr.show_versions()
INSTALLED VERSIONS ------------------ commit: None python: 3.7.5 (default, Oct 25 2019, 15:51:11) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.15.0-1080-oem machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.1xarray: 0.15.1
pandas: 0.25.3
numpy: 1.17.4
scipy: 1.3.2
netCDF4: 1.4.2
pydap: None
h5netcdf: 0.8.0
h5py: 2.9.0
Nio: None
zarr: None
cftime: 1.0.4.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.3.1
dask: 2.9.0
distributed: 2.9.0
matplotlib: 3.1.1
cartopy: None
seaborn: 0.9.0
numbagg: None
setuptools: 42.0.2.post20191203
pip: 19.3.1
conda: None
pytest: 5.3.2
IPython: 7.10.2
sphinx: 2.3.0
The text was updated successfully, but these errors were encountered: