##// END OF EJS Templates
refactor to improve cell switching in edit mode...
refactor to improve cell switching in edit mode This code was repeated in both CodeCell and TextCell, both of which are extensions of Cell, so this just unifies the logic in Cell. TextCell had logic here to check if the cell was rendered or not, but I don't believe it is possible to end up triggering such a code path. (Should that be required, I can always just add back these methods to TextCell, performing the .rendered==True check, and calling the Cell prior to this, code mirror at_top would only return true on if the cursor was at the first character of the top line. Now, pressing up arrow on any character on the top line will take you to the cell above. The same applies for the bottom line. Pressing down arrow would only go to the next cell if the cursor was at a location *after* the last character (something that is only possible to achieve in vim mode if the last line is empty, for example). Now, down arrow on any character of the last line will go to the next cell.

File last commit:

r15264:c2a94ec4
r15754:d60e793e
Show More
outputarea.less
167 lines | 3.3 KiB | text/x-less | LessCssLexer
div.output_wrapper {
/* this position must be relative to enable descendents to be absolute within it */
position: relative;
.vbox()
}
/* class for the output area when it should be height-limited */
div.output_scroll {
/* ideally, this would be max-height, but FF barfs all over that */
height: 24em;
/* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
width: 100%;
overflow: auto;
.corner-all;
.box-shadow(inset 0 2px 8px rgba(0, 0, 0, .8));
display: block;
}
/* output div while it is collapsed */
div.output_collapsed {
margin: 0px;
padding: 0px;
.vbox();
}
div.out_prompt_overlay {
height: 100%;
padding: 0px @code_padding;
position: absolute;
.corner-all;
}
div.out_prompt_overlay:hover {
/* use inner shadow to get border that is computed the same on WebKit/FF */
.box-shadow(inset 0 0 1px #000);
background: rgba(240, 240, 240, 0.5);
}
div.output_prompt {
color: darkred;
}
/* This class is the outer container of all output sections. */
div.output_area {
padding: 0px;
page-break-inside: avoid;
.hbox();
.MathJax_Display {
// Inside a CodeCell, elements are left justified
text-align: left !important;
}
.rendered_html {
// Inside a CodeCell, elements are left justified
table {
margin-left: 0;
margin-right: 0;
}
img {
margin-left: 0;
margin-right: 0;
}
}
}
/* This is needed to protect the pre formating from global settings such
as that of bootstrap */
.output {
.vbox();
}
div.output_area pre {
font-family: @monoFontFamily;
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
color: black;
background-color: transparent;
.border-radius(0);
line-height: inherit;
}
/* This class is for the output subarea inside the output_area and after
the prompt div. */
div.output_subarea {
padding: @code_padding @code_padding 0.0em @code_padding;
.box-flex1();
}
/* The rest of the output_* classes are for special styling of the different
output types */
/* all text output has this class: */
div.output_text {
text-align: left;
color: @textColor;
font-family: @monoFontFamily;
/* This has to match that of the the CodeMirror class line-height below */
line-height: @code_line_height;
}
/* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
div.output_stream {
}
div.output_stdout {
}
div.output_stderr {
background: #fdd; /* very light red background for stderr */
}
div.output_latex {
text-align: left;
}
div.output_html {
}
div.output_png {
}
div.output_jpeg {
}
/* Empty output_javascript divs should have no height */
div.output_javascript:empty {
padding: 0;
}
.js-error {
color: darkred;
}
/* raw_input styles */
div.raw_input {
padding-top: 0px;
padding-bottom: 0px;
height: 1em;
line-height: 1em;
font-family: @monoFontFamily;
}
span.input_prompt {
font-family: inherit;
}
input.raw_input {
font-family: inherit;
font-size: inherit;
color: inherit;
width: auto;
margin: -2px 0px 0px 1px;
padding-left: 1px;
padding-top: 2px;
height: 1em;
}
p.p-space {
margin-bottom: 10px;
}