I don't fully understand the problem, but I think it comes down
to when .CodeMirror-sizer figures out the size of its container.
A sage cell is a large number of nested divs. If you start looking
at the size of those divs (I am using the inspector in Firefox)
you will see that all of them are the same size, except for
< div class="CodeMirror-sizer" style=.... >
which is larger and shifted to the left of where it should be.
If you look at the highlighted region when you focus on it in
inspector (yellow for padding, blue for contents) you will
see that the section with the numbers is too wide, but otherwise
the contents of the cell are where the .CodeMirror-sizer wants
them to be.
So I speculate that something outside the sage cell has changed
its size after the cell has set itself up. If you modify the
css (in inspector or otherwise) and in
reveal .slides > section,
remove the
width: 100%
then you will find that the cell looks better. It also helps
in div.slides to remove the inline style that sets width=960px .
I think all of this points to the sage cell being created before the
rest of the page is set up. (Or to the sage cell code having a bug
in how it figures out what size to make the div.CodeMirror-sizer .
But I think that is unlikely, because different parts of JavaScript
not waiting long enough, or not running in the correct order,
is a common problem. Also see the next paragraph.)
By the way, I re-loaded the page and the cell looked good and also
seemed to work properly. (But not always, and sometimes some look
right and some don't). I think this supports the suggestion that it
is the sage cell code running at the wrong time.
I never used reveal so I can't suggest how to fix this.
Regards,
David
> --
> You received this message because you are subscribed to the Google Groups "sage-cell" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
>
sage-cell+...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sage-cell/6ed4788e-e006-47fd-a937-2879db494fc3%40googlegroups.com.
>
>