Previously for jupyter-notebook <7 one could use a custom.css file to adjust certain properties of the notebook, e.g., the width of the cells, the width of the complete notebook, and many others.
Now, since the update to jupyter-notebook >=7 the custom.css file does not seem to do anything to the notebook anymore (it still does so to the jupyter-nbclassic). Is this proper behavior?
If custom.css files are not working anymore for jupyter-notebook >=7, how can I get a notebook to fill all of my browser’s width?
Thx. for your help.
I’m trying to change the color of matching parentheses in code cells using custom.css . The content I’ve added is:
/* Modify Hovered Parentheses Foreground Color for JupyterLab /
.jp-CodeCell .CodeMirror .cm-s-jupyter .CodeMirror-matchingbracket:hover {
color: red !important; / 设置匹配括号的颜色为红色 */
}
I want the matching parentheses to appear in red, but it’s not working.
Notebook 7 uses CodeMirror v6. .CodeMirror-matchingbracket is not the correct class name for CodeMirror 6. It should be .cm-matchingBracket. Then, your code includes :hover which means it would be only applied on hover. .CodeMirror is also an old class name, in CodeMirror 6 it is .cm-editor. The following works for me: