restore to jupyter default theme inside the notebook?

327 views
Skip to first unread message

Hai Nguyen

unread,
Jun 28, 2016, 3:38:31 PM6/28/16
to jup...@googlegroups.com
Hi all,

I wrote a function to change Jupyter notebook theme on the fly by displaying the HTML css.

I also want to restore to the default theme. How can I do that?

The code is every simple

    css = open(css_file).read()
    return display.HTML(style.format(css))


My original idea is to create ipywidgets's Buttons to pick up either my theme or Jupyter original theme.

thanks.

Hai

Matthias Bussonnier

unread,
Jun 28, 2016, 4:17:08 PM6/28/16
to jup...@googlegroups.com
Delete the cell.
--
M
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAFNMPM_5EAwkheXMP9DGy03TK2dyX8kq4u9FQv67wQWCSaRKiw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Hai Nguyen

unread,
Jun 28, 2016, 4:31:38 PM6/28/16
to jup...@googlegroups.com
Hi,

Yes, delete or comment the cell does the trick. But it's really not what I want.
The image I showed is using ipywidget's Tab. If deleting cell, the tab will be disappeared too.

This is how the tab looks like: https://cloud.githubusercontent.com/assets/4451957/16402850/bd6972de-3cbd-11e6-9d31-e39765f0f583.png

But if there is no another way, I can live with deleting cell. thanks

Hai

Matthias Bussonnier

unread,
Jun 28, 2016, 4:57:48 PM6/28/16
to jup...@googlegroups.com
Just don't inject the css in the same cell, or give the css a specific
id and remove it from the DOM.
> https://groups.google.com/d/msgid/jupyter/CAFNMPM-01xCG82SEh-ChXC-o8BAJYE6qNAdW-M-AwQKy8M7_5Q%40mail.gmail.com.

Hai Nguyen

unread,
Jun 28, 2016, 5:12:08 PM6/28/16
to jup...@googlegroups.com
On Tue, Jun 28, 2016 at 4:57 PM, Matthias Bussonnier <bussonnie...@gmail.com> wrote:
Just don't inject the css in the same cell,

 
or give the css a specific
id and remove it from the DOM.

great. thanks. Hai
Reply all
Reply to author
Forward
0 new messages