executablebooks / meta

A community dedicated to supporting tools for technical and scientific communication and interactive computing
https://executablebooks.org
131 stars 167 forks source link

notebook css styling for nbconvert and ebp #42

Open phaustin opened 4 years ago

phaustin commented 4 years ago

Quick question(s) -- I'd appreciate suggestions/guidance on writing css styles that will work with both ebp and nbconvert for notebook cells/widgets/pages. Does ebp plan to port the notebook less files to scss for bootstrap4 compatibility (and am I correct that jupyterlab has moved to straight css with no preprocessor)?

chrisjsewell commented 4 years ago

This is the default CSS for myst-nb: https://github.com/ExecutableBookProject/MyST-NB/blob/master/myst_nb/_static/mystnb.css, which you can customise via sphinx in the build process, I believe this has decent overlap with the classes used in nbconvert base.html.j2.

Does ebp plan to port the notebook less files to scss for bootstrap4 compatibility

This sentence means absolutely nothing to me lol, @choldgraf may know more

phaustin commented 4 years ago

Thanks, that's helpful -- elaborating on some of the buzzwords: the css file that nbconvert uses for html: style.css is generated from style.less using the lessc preprocessor. The pandas-sphinx-theme that is installed allong with executable_book_cli uses bootstrap4, which has switched from less to the rival preprocessor sass. From the 7 days I've spent in the web development hall of mirrors, I get the impression that less is being generally replaced by sass, I also get the impression that the notebook is being phased out in favor of jupyterlab, but it really has been only 7 days, so who knows.

choldgraf commented 4 years ago

Hey @phaustin - a couple quick thoughts: