Making codemirror resize in embedded sage cells

37 views
Skip to first unread message

Jason Grout

unread,
Feb 26, 2013, 10:16:14 PM2/26/13
to sage-n...@googlegroups.com, Rob Beezer
Some of you have been changing the CSS on an embedded Sage cell to make
the cell grow with the content, rather than be a fixed 200px tall. I
just upgraded to CodeMirror 3.1, which changes how this is done. Now
the correct CSS to do this should be:

.CodeMirror {
height: auto;
min-height: 10ex; /* if wanted */
max-height: 60ex; /* if wanted */
}
.CodeMirror-scroll {
overflow-x: auto;
overflow-y: hidden;
}

Thanks,

Jason

kcrisman

unread,
Feb 26, 2013, 11:31:40 PM2/26/13
to sage-n...@googlegroups.com
Thanks.  Tedious, but thanks :) 

Jason Grout

unread,
Feb 27, 2013, 12:28:24 AM2/27/13
to sage-n...@googlegroups.com
There are some cool things we can do with CodeMirror 3. The upgrade and
pain is worth it.... :)

Jason

kcrisman

unread,
Feb 27, 2013, 9:02:04 AM2/27/13
to sage-n...@googlegroups.com
Well... it definitely made for a late night so that my notes still work.  It would have been helpful to have a little more lead time :) 

Jason Grout

unread,
Feb 27, 2013, 12:36:03 PM2/27/13
to sage-n...@googlegroups.com
Your notes should have still worked fine, but the text areas would have
been a fixed size instead of expandable.

Good point about the lead time, though. I'm at Sage Days and wanted to
push in some other changes too, but I could have held off on pushing
these changes to the public server. Sorry.

Thanks,

Jason

kcrisman

unread,
Feb 27, 2013, 1:49:08 PM2/27/13
to sage-notebook

> Your notes should have still worked fine, but the text areas would have
> been a fixed size instead of expandable.

Yes, and a very annoyingly large fixed size it was! Hence the need to
revise quickly.

>
> Good point about the lead time, though.  I'm at Sage Days and wanted to
> push in some other changes too, but I could have held off on pushing
> these changes to the public server.  Sorry.

No problem; we are so thankful for sagecell.sagemath.org! Though I
have to say I am less sympathetic given the location of SD 46 [1]...
why can't my spring break have been now?

[1] http://wiki.sagemath.org/sagedays46

Jason Grout

unread,
Feb 27, 2013, 1:58:28 PM2/27/13
to sage-n...@googlegroups.com
On 2/27/13 8:49 AM, kcrisman wrote:

> No problem; we are so thankful for sagecell.sagemath.org! Though I
> have to say I am less sympathetic given the location of SD 46 [1]...
> why can't my spring break have been now?
>

Yes, the surf breaking out a few hundred yards from the balcony is very
disruptive to concentration. The Polynesian spear-throwing
fire-wielding guys might be more so this afternoon [1].

Jason

[1] http://www.polynesia.com/

Reply all
Reply to author
Forward
0 new messages