如何编辑JupyterLab主题?

问题描述 投票:1回答:1

我想编辑的JupyterLab黑暗的主题,所以内联地块是轴标签可以清楚地读出。该问题的例子:Example of the issue with the Dark theme

为了解决这个问题,我想改变其含有图像以灰色阴影输出单元的背景色。我没有使用Chrome DevTools来insepect的网页,发现类class="p-Widget jp-RenderedImage jp-mod-trusted jp-OutputArea-output"

Div class that I'd like to alter

我注意到,我可以通过使用JupyterLab轻主题,或者使用matplotlib暗标绘的主题,但是我想直接解决这个问题解决此问题。我欢迎所有的建议,或资源的方向看,这将有助于我了解并解决这个问题。谢谢!

相关GitHub上的问题:

相关SO问题:

jupyter-lab
1个回答
3
投票

编辑Jupypter实验室主题,您需要更改它位于variables.css文件jupyterlab/packages/[THEME NAME]/style/

你可以检查你想改变找出同类产品中Jupyter实验室的元素。我没有使用Chrome DevTools ctrl+shift+i和点击不同的div类,直到我发现了一个我想要改变。

一旦你有你想自定义DIV类的名称,添加更改variables.css文件。这是我改变的结果。

.jp-RenderedImage {
  background-color: #A4A4A4
}

Change background of figures to grey to allow axis to be read

您可以使用由JupyterLab贡献者之一创建this gist (where the code in the first cell comes from)带你进入variables.css文件所做的更改进行试验。

© www.soinside.com 2019 - 2024. All rights reserved.