[BUG] Map overrides theme in VSC interactive display.
Context
When using lonboard in VSC jupyter interactive in dark mode, once I display a Map, the output for everything carries the theme of the Map of white background. Before running a map it looks like:
Resulting behaviour, error message or logs
After having run a map it looks like this:
Environment
Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Python: 3.12.2 (main, Feb 25 2024, 16:35:05) [GCC 11.4.0]
- Lonboard Version: '0.10.3' VSC: 1.93.1 Chromium: 124.0.6367.243
Steps to reproduce the bug
Using VSC with dark theme. Make a map then all cells get the Map's style, at least for background and font.
I don't particularly understand CSS styling and what's happening here. But it's also quite difficult to provide CSS that works as expected in every environment, when Jupyter/JupyterLab/Colab/vscode etc are all implemented in different ways. Happy to accept a PR or maybe @vgeorge has time at some point to look into this. (but lower priority than some bugs in the last release like https://github.com/developmentseed/lonboard/issues/675)
Hello @kylebarron and @vgeorge I'm experiencing a similar issue with VSC and am wondering if there is any room to make a contribution on this? WSL2 ubuntu 22.04 - lonboard 0.10.3 - python 3.11.10
A fix here would be greatly appreciated!
@kylebarron I haven't found a fix yet, though it is possible that this is an issue with VSCode and ipywidgets, and not necessarily lonboard - See this open ticket from the vscode-jupyter repo
Add support for theming of IPyWidgets #7161
This does not work with me, anyone else got it to work with lonboard? https://github.com/microsoft/vscode-jupyter/issues/7161#issuecomment-1616627670
edit - having a cell with the following code works for me, change "black" with whatever background colour that is in your vscode theme:
%%html
<style>
html {
background-color: black !important;
}
</style>
I think this is closed via https://github.com/developmentseed/lonboard/pull/740