[IPython-dev] Preferred way to customize CSS for something that will be displayed on nbviewer?

Matthias Bussonnier bussonniermatthias@gmail....
Thu Feb 20 04:54:39 CST 2014


There should be a discussion on IPython user about that from a few weeks ago. 

We are thinking on metadata in notebook level that nbviewer could look at that allow to select a theme on nbviewer.

IPEP and code to do so have to be written.

Envoyé de mon iPhone

> Le 20 févr. 2014 à 04:58, Aron Ahmadia <aron@ahmadia.net> a écrit :
> 
> Let's say I've developed a snazzy CSS file and I want it so that an uploaded notebook being viewed on nbviewer uses my custom CSS.
> 
> I've seen this bit of code in the wild[1]:
> 
> from IPython.core.display import HTML
> def css_styling():
>     styles = open("../styles/custom.css", "r").read()
>     return HTML(styles)
> css_styling()
> 
> But this seems a bit awkward, since I'm effectively just piping the CSS file into the notebook's rendered HTML.  Does nbviewer know to look anywhere for CSS, or is this the best we have right now?
> 
> -A
> 
> [1] http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/00_Lesson00_QuickPythonIntro.ipynb
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20140220/5118b0c4/attachment.html 


More information about the IPython-dev mailing list