【问题标题】:Changing jupyter's matching parenthesis color更改 jupyter 的匹配括号颜色
【发布时间】:2016-09-25 11:00:28
【问题描述】:

如何更改 jupyter 中匹配括号的颜色?正括号、方括号和大括号在显示为匹配对时都显示为亮绿色,在浅色背景中很难看到。

通过添加.CodeMirror-matchingbracket 来修改~/.jupyter/custom/custom.css 似乎对我没有任何作用。

【问题讨论】:

  • 我知道你问这个问题已经有一段时间了,但你试过下面的答案吗?

标签: css jupyter-notebook jupyter codemirror


【解决方案1】:

在 ~/.jupyter/custom/custom.css 中尝试添加以下内容:

.cm-s-ipython .CodeMirror-matchingbracket { color: black !important;} 如果您不希望颜色为黑色,可以使用任何您喜欢的webcolors

【讨论】:

    【解决方案2】:

    ~/.jupyter/custom/custom.css 中,我使用以下内容更改括号及其背景颜色(以下内容将其更改为黄色背景的红色,但您可以根据需要进行修改)

    div.CodeMirror span.CodeMirror-matchingbracket {
        color: #FF0000;
        background-color: #FFFF00;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-25
      • 1970-01-01
      • 1970-01-01
      • 2023-02-01
      • 2019-08-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-29
      相关资源
      最近更新 更多