New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CSS?] Inconsistencies in nbconvert divs and IPython Notebook divs? #5206
Comments
I think this is just a bug in nbconvert - the class structure should match the live notebook. |
For those following along at home, I guess most of the nbconvert to HTML element class hierarchy happen here:
I'm going to try a hand at gently refactoring that to look more like the live notebook element class hierarchy and submit a PR, but I'm suspecting one of the core devs will need to write the final PR, since I am not very familiar with this code :/ |
Addresses ipython#5206 This partially mimics the live IPython notebook layout, but is not a complete solution.
closed by #5212 |
Addresses ipython#5206 This partially mimics the live IPython notebook layout, but is not a complete solution.
Addresses ipython/ipython#5206 This partially mimics the live IPython notebook layout, but is not a complete solution.
I'm working with some custom css used by Lorena Barba's group for her AeroPython notebooks. The recent nbviewer bump just borked our layouts. Looking through the HTML being generated by the live Notebook and nbviewer, I'm seeing inconsistencies in the way the cells are being classified by the engines.
In IPython Notebook master, there's a structure like:
(text cell)
<div class ="cell text_cell ...">
(code cell)
<div class="cell code_cell ...">
Output from nbconvert, on the other hand, looks like:
(text cell)
<div class="input">
(code cell)
<div class="cell border-box-sizing code_cell">
->
<div class="input">
I'll be the first to admit, I'm not great at CSS, but this seems incredibly inconsistent to me. Why use
input
at the top level of nbconvert? Shouldn't that becell text_cell
orcell text_cell_render
to be consistent with the rest of the notebook which in turn contain elements of classinput
?What am I misunderstanding here? Here's Lorena's current custom.css, which looks terrible on the recent nbviewer because text cells are not being styled.
Release nbconvert in 1.1 appears to generate something like:
(text cell)
<div class ="text_cell_render ...">
(code cell)
<div class="cell code_cell ...">
Which is at least more consistent. I'm wondering why we aren't at least flagging text cells as the generic
cell
class. Trying to figure out the CSS on the generated HTML is giving me a headache :(The text was updated successfully, but these errors were encountered: