0

Currently, the active cell doesn't change apart from a blue bar showing on the side.

enter image description here It would be good if the active cell was more prominent. For example, how can I have a border around the cell like the border in Jupyter notebook? Or change the background to a darker grey?

multigoodverse
  • 7,638
  • 19
  • 64
  • 106
  • See if [jupyter-themes](https://github.com/dunovank/jupyter-themes) may help, either one of the themes in there or something you customize. – jdehesa Feb 18 '19 at 14:40
  • @jdehesa They don't seem to work for Jupyter Lab: https://stackoverflow.com/questions/40518614/how-to-apply-theme-to-jupyter-lab – multigoodverse Feb 18 '19 at 14:46

1 Answers1

4

One option is to create a file custom.css with the content:

<style>
    .jp-mod-active .jp-CodeMirrorEditor {
        border: var(--jp-border-width) solid var(--jp-cell-editor-active-border-color);
    }
</style>

Then, run the following:

from IPython.core.display import HTML
with open('./custom.css', 'r') as f: style = f.read()
HTML(style)

And now the active cell will have a blue border:

enter image description here

cody
  • 11,045
  • 3
  • 21
  • 36
  • Thanks so much! That's almost perfect. It doesn't work for markup cells though. Would it be possible to have the markup cells highlighted the same way? – multigoodverse Feb 26 '19 at 15:16
  • Is there a workaround to not have to put the Python code in a cell, but somewhere else in case you don't want to show that code to the audience when presenting the notebook? – multigoodverse Apr 25 '19 at 09:29