notebook.less
464 lines
| 8.9 KiB
| text/x-less
|
LessCssLexer
Brian E. Granger
|
r4379 | /** | ||
* Primary styles | ||||
* | ||||
* Author: IPython Development Team | ||||
*/ | ||||
Matthias BUSSONNIER
|
r9260 | @import "variables.less"; | ||
Matthias BUSSONNIER
|
r9367 | |||
Brian Granger
|
r4292 | body { | ||
Matthias BUSSONNIER
|
r9264 | background-color:@notebook_background; | ||
Brian Granger
|
r4311 | } | ||
Matthias BUSSONNIER
|
r9290 | |||
body.notebook_app { | ||||
overflow: hidden; | ||||
} | ||||
Brian Granger
|
r4311 | |||
mr.Shu
|
r8952 | blockquote { | ||
border-left: 4px solid #DDD; | ||||
padding: 0 15px; | ||||
color: #777; | ||||
} | ||||
Brian E. Granger
|
r4372 | span#save_widget { | ||
Brian Granger
|
r5859 | padding: 5px; | ||
Brian Granger
|
r5857 | margin: 0px 0px 0px 300px; | ||
Matthias BUSSONNIER
|
r5702 | display:inline-block; | ||
Brian E. Granger
|
r4372 | } | ||
Brian Granger
|
r5859 | span#notebook_name { | ||
height: 1em; | ||||
line-height: 1em; | ||||
padding: 3px; | ||||
border: none; | ||||
font-size: 146.5%; | ||||
} | ||||
Matthias BUSSONNIER
|
r9055 | |||
Brian Granger
|
r5869 | .ui-menubar-item .ui-button .ui-button-text { | ||
padding: 0.4em 1.0em; | ||||
font-size: 100%; | ||||
} | ||||
.ui-menu { | ||||
-moz-box-shadow: 0px 6px 10px -1px #adadad; | ||||
-webkit-box-shadow: 0px 6px 10px -1px #adadad; | ||||
box-shadow: 0px 6px 10px -1px #adadad; | ||||
} | ||||
.ui-menu .ui-menu-item a { | ||||
mcelrath
|
r7300 | border: 1px solid transparent; | ||
Brian Granger
|
r5870 | padding: 2px 1.6em; | ||
Brian Granger
|
r5869 | } | ||
mcelrath
|
r7320 | .ui-menu .ui-menu-item a.ui-state-focus { | ||
margin: 0; | ||||
} | ||||
Brian Granger
|
r5869 | .ui-menu hr { | ||
margin: 0.3em 0; | ||||
} | ||||
Brian Granger
|
r6047 | #menubar_container { | ||
position: relative; | ||||
} | ||||
Matthias BUSSONNIER
|
r8011 | #notification_area { | ||
Brian Granger
|
r6047 | position: absolute; | ||
Matthias BUSSONNIER
|
r8011 | right: 0px; | ||
top: 0px; | ||||
height: 25px; | ||||
Matthias BUSSONNIER
|
r8029 | padding: 3px 0px; | ||
padding-right: 3px; | ||||
Matthias BUSSONNIER
|
r8011 | z-index: 10; | ||
} | ||||
Matthias BUSSONNIER
|
r8074 | .notification_widget{ | ||
Matthias BUSSONNIER
|
r8011 | float : right; | ||
Matthias BUSSONNIER
|
r8029 | right: 0px; | ||
top: 1px; | ||||
Brian Granger
|
r6047 | height: 25px; | ||
padding: 3px 6px; | ||||
z-index: 10; | ||||
} | ||||
Matthias BUSSONNIER
|
r7832 | .toolbar { | ||
Brian Granger
|
r5993 | padding: 3px 15px; | ||
Matthias BUSSONNIER
|
r9264 | border-bottom: @borderwidth @border_color solid; | ||
Brian Granger
|
r5993 | } | ||
Matthias BUSSONNIER
|
r9297 | .toolbar select, .toolbar label { | ||
Matthias BUSSONNIER
|
r9366 | height : 19px; | ||
Bussonnier Matthias
|
r9274 | vertical-align: top; | ||
margin-right:2px; | ||||
margin-bottom:0; | ||||
Matthias BUSSONNIER
|
r9280 | display: inline; | ||
Matthias BUSSONNIER
|
r9366 | font-size: 92%; | ||
Matthias BUSSONNIER
|
r9080 | margin-left:0.3em; | ||
margin-right:0.3em; | ||||
Matthias BUSSONNIER
|
r9295 | } | ||
Matthias BUSSONNIER
|
r9080 | |||
Matthias BUSSONNIER
|
r9295 | .toolbar select{ | ||
width:auto; | ||||
Brian Granger
|
r5994 | } | ||
Brian Granger
|
r6192 | |||
Bussonnier Matthias
|
r9265 | #ipython-main-app { | ||
Brian Granger
|
r6192 | width: 100%; | ||
position: relative; | ||||
} | ||||
Fernando Perez
|
r5023 | span#quick_help_area { | ||
position: static; | ||||
padding: 5px 0px; | ||||
margin: 0px 0px 0px 0px; | ||||
} | ||||
Brian E. Granger
|
r4516 | .help_string { | ||
float: right; | ||||
width: 170px; | ||||
padding: 0px 5px; | ||||
Brian E. Granger
|
r4646 | text-align: left; | ||
Brian E. Granger
|
r4640 | font-size: 85%; | ||
Brian E. Granger
|
r4516 | } | ||
.help_string_label { | ||||
float: right; | ||||
Brian E. Granger
|
r4640 | font-size: 85%; | ||
Brian E. Granger
|
r4516 | } | ||
Brian E. Granger
|
r4360 | div#notebook_panel { | ||
Brian E. Granger
|
r4363 | margin: 0px 0px 0px 0px; | ||
Brian E. Granger
|
r4360 | padding: 0px; | ||
Brian E. Granger
|
r4355 | } | ||
div#notebook { | ||||
overflow-y: scroll; | ||||
overflow-x: auto; | ||||
Brian E. Granger
|
r4360 | width: 100%; | ||
Brian E. Granger
|
r4525 | /* This spaces the cell away from the edge of the notebook area */ | ||
Fernando Perez
|
r5017 | padding: 5px 5px 15px 5px; | ||
MinRK
|
r7362 | margin: 0px; | ||
Brian Granger
|
r4331 | } | ||
Brian Granger
|
r4311 | |||
Brian E. Granger
|
r4360 | div#pager_splitter { | ||
Brian E. Granger
|
r4361 | height: 8px; | ||
Brian E. Granger
|
r4360 | } | ||
Matthias BUSSONNIER
|
r8265 | #pager_container { | ||
position : relative; | ||||
} | ||||
Brian E. Granger
|
r4360 | div#pager { | ||
Brian E. Granger
|
r4364 | padding: 15px; | ||
Brian E. Granger
|
r4360 | overflow: auto; | ||
Brian Granger
|
r5948 | display: none; | ||
Brian E. Granger
|
r4360 | } | ||
mcelrath
|
r7300 | div.ui-widget-content { | ||
Matthias BUSSONNIER
|
r9260 | border: 1px solid @border_color; | ||
mcelrath
|
r7300 | outline: none; | ||
} | ||||
.cell { | ||||
border: 1px solid transparent; | ||||
Matthias BUSSONNIER
|
r9260 | |||
&.selected { | ||||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
Matthias BUSSONNIER
|
r9260 | background-color:@cell_selected_background; | ||
border : thin @border_color solid; | ||||
} | ||||
mcelrath
|
r7300 | } | ||
Brian Granger
|
r4292 | div.cell { | ||
Brian Granger
|
r4311 | width: 100%; | ||
Fernando Perez
|
r5017 | padding: 5px 5px 5px 0px; | ||
Brian Granger
|
r4324 | /* This acts as a spacer between cells, that is outside the border */ | ||
Fernando Perez
|
r5017 | margin: 2px 0px 2px 0px; | ||
Brian E. Granger
|
r9220 | outline: none; | ||
Brian Granger
|
r4292 | } | ||
div.code_cell { | ||||
} | ||||
MinRK
|
r7362 | |||
MinRK
|
r5221 | /* any special styling for code cells that are currently running goes here */ | ||
div.code_cell.running { | ||||
} | ||||
Brian Granger
|
r4292 | |||
div.prompt { | ||||
Brian E. Granger
|
r4642 | /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ | ||
Brian E. Granger
|
r4643 | width: 11ex; | ||
Brian E. Granger
|
r4525 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ | ||
Brian Granger
|
r4366 | padding: 0.4em; | ||
Brian Granger
|
r4299 | margin: 0px; | ||
Brian E. Granger
|
r4379 | font-family: monospace; | ||
Brian E. Granger
|
r9220 | text-align: right; | ||
/* This has to match that of the the CodeMirror class line-height below */ | ||||
line-height: 1.231; | ||||
Brian Granger
|
r4292 | } | ||
Brian E. Granger
|
r4625 | div.input { | ||
page-break-inside: avoid; | ||||
} | ||||
MinRK
|
r4887 | /* input_area and input_prompt must match in top border and margin for alignment */ | ||
Brian E. Granger
|
r4531 | div.input_area { | ||
Bussonnier Matthias
|
r9279 | /*color: @fontBaseColor;*/ | ||
Matthias BUSSONNIER
|
r9369 | border: 1px solid @light_border_color; | ||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
Matthias BUSSONNIER
|
r9260 | background: @cell_background; | ||
Brian E. Granger
|
r4531 | } | ||
Brian Granger
|
r4292 | div.input_prompt { | ||
Brian Granger
|
r4332 | color: navy; | ||
MinRK
|
r4887 | border-top: 1px solid transparent; | ||
Brian Granger
|
r4292 | } | ||
MinRK
|
r7362 | div.output_wrapper { | ||
Brian Granger
|
r4324 | /* This is a spacer between the input and output of each cell */ | ||
Brian E. Granger
|
r4525 | margin-top: 5px; | ||
MinRK
|
r7362 | margin-left: 5px; | ||
/* FF needs explicit width to stretch */ | ||||
width: 100%; | ||||
/* this position must be relative to enable descendents to be absolute within it */ | ||||
position: relative; | ||||
} | ||||
/* 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%; | ||||
Matthias BUSSONNIER
|
r9284 | |||
MinRK
|
r7362 | overflow: auto; | ||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
MinRK
|
r7362 | box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8); | ||
} | ||||
/* output div while it is collapsed */ | ||||
div.output_collapsed { | ||||
margin-right: 5px; | ||||
} | ||||
div.out_prompt_overlay { | ||||
height: 100%; | ||||
padding: 0px; | ||||
position: absolute; | ||||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
MinRK
|
r7362 | } | ||
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; | ||||
MinRK
|
r7574 | background: rgba(240, 240, 240, 0.5); | ||
Brian Granger
|
r4292 | } | ||
div.output_prompt { | ||||
Brian Granger
|
r4332 | color: darkred; | ||
MinRK
|
r7362 | /* 5px right shift to account for margin in parent container */ | ||
MinRK
|
r7573 | margin: 0 5px 0 -5px; | ||
Brian Granger
|
r4292 | } | ||
Brian E. Granger
|
r4642 | /* This class is the outer container of all output sections. */ | ||
Brian E. Granger
|
r4531 | div.output_area { | ||
Brian E. Granger
|
r4642 | padding: 0px; | ||
Brian E. Granger
|
r4625 | page-break-inside: avoid; | ||
Brian E. Granger
|
r4504 | } | ||
Brian E. Granger
|
r9220 | |||
/* This is needed to protect the pre formating from global settings such | ||||
as that of bootstrap */ | ||||
div.output_area pre { | ||||
font-family: monospace; | ||||
margin: 0; | ||||
padding: 0; | ||||
border: 0; | ||||
font-size: 100%; | ||||
font: inherit; | ||||
vertical-align: baseline; | ||||
color: black; | ||||
} | ||||
Brian E. Granger
|
r4642 | /* This class is for the output subarea inside the output_area and after | ||
the prompt div. */ | ||||
div.output_subarea { | ||||
Bussonnier Matthias
|
r8468 | padding: 0.44em 0.4em 0.4em 1px; | ||
Brian E. Granger
|
r4531 | } | ||
/* The rest of the output_* classes are for special styling of the different | ||||
output types */ | ||||
MinRK
|
r4883 | /* all text output has this class: */ | ||
div.output_text { | ||||
Brian E. Granger
|
r4531 | text-align: left; | ||
Bussonnier Matthias
|
r9279 | color: @fontBaseColor; | ||
Brian E. Granger
|
r4531 | font-family: monospace; | ||
Brian E. Granger
|
r9220 | /* This has to match that of the the CodeMirror class line-height below */ | ||
line-height: 1.231; | ||||
Brian Granger
|
r4317 | } | ||
MinRK
|
r4883 | |||
/* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */ | ||||
div.output_stream { | ||||
padding-top: 0.0em; | ||||
padding-bottom: 0.0em; | ||||
} | ||||
div.output_stdout { | ||||
} | ||||
MinRK
|
r4865 | div.output_stderr { | ||
MinRK
|
r4883 | background: #fdd; /* very light red background for stderr */ | ||
MinRK
|
r4865 | } | ||
Brian Granger
|
r4317 | |||
div.output_latex { | ||||
Brian E. Granger
|
r4531 | text-align: left; | ||
Brian Granger
|
r4317 | } | ||
MinRK
|
r4403 | div.output_html { | ||
} | ||||
Brian E. Granger
|
r4348 | div.output_png { | ||
} | ||||
Brian Granger
|
r4292 | |||
Brian E. Granger
|
r4531 | div.output_jpeg { | ||
} | ||||
Brian Granger
|
r4508 | div.text_cell { | ||
Brian Granger
|
r5946 | padding: 5px 5px 5px 5px; | ||
Brian Granger
|
r4292 | } | ||
Brian Granger
|
r4508 | div.text_cell_input { | ||
Bussonnier Matthias
|
r9279 | color: @fontBaseColor; | ||
Matthias BUSSONNIER
|
r9260 | border: 1px solid @border_color; | ||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
Matthias BUSSONNIER
|
r9260 | background: @cell_background; | ||
Brian E. Granger
|
r4507 | } | ||
Brian Granger
|
r4508 | div.text_cell_render { | ||
Bussonnier Matthias
|
r9276 | /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/ | ||
Brian E. Granger
|
r4507 | outline: none; | ||
resize: none; | ||||
width: inherit; | ||||
border-style: none; | ||||
padding: 5px; | ||||
Bussonnier Matthias
|
r9279 | color: @fontBaseColor; | ||
Brian E. Granger
|
r4507 | } | ||
mcelrath
|
r7446 | /* The following gets added to the <head> if it is detected that the user has a | ||
* monospace font with inconsistent normal/bold/italic height. See | ||||
* notebookmain.js. Such fonts will have keywords vertically offset with | ||||
Matthias BUSSONNIER
|
r9284 | * respect to the rest of the text. The user should select a better font. | ||
mcelrath
|
r7446 | * See: https://github.com/ipython/ipython/issues/1503 | ||
* | ||||
* .CodeMirror span { | ||||
* vertical-align: bottom; | ||||
* } | ||||
*/ | ||||
mcelrath
|
r7347 | |||
Brian E. Granger
|
r4379 | .CodeMirror { | ||
Brian E. Granger
|
r4638 | line-height: 1.231; /* Changed from 1em to our global default */ | ||
Brian E. Granger
|
r4379 | } | ||
Brian E. Granger
|
r4504 | .CodeMirror-scroll { | ||
Brian E. Granger
|
r4638 | height: auto; /* Changed to auto to autogrow */ | ||
/* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ | ||||
/* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ | ||||
overflow-y: hidden; | ||||
overflow-x: auto; /* Changed from auto to remove scrollbar */ | ||||
Brian E. Granger
|
r4504 | } | ||
Brian Granger
|
r4383 | /* CSS font colors for translated ANSI colors. */ | ||
Bussonnier Matthias
|
r9279 | .ansiblack {color: @fontBaseColor;} | ||
Brian Granger
|
r4383 | .ansired {color: darkred;} | ||
.ansigreen {color: darkgreen;} | ||||
.ansiyellow {color: brown;} | ||||
.ansiblue {color: darkblue;} | ||||
.ansipurple {color: darkviolet;} | ||||
.ansicyan {color: steelblue;} | ||||
.ansigrey {color: grey;} | ||||
.ansibold {font-weight: bold;} | ||||
Matthias BUSSONNIER
|
r7187 | .completions { | ||
Brian E. Granger
|
r4389 | position: absolute; | ||
z-index: 10; | ||||
Matthias BUSSONNIER
|
r7539 | overflow: hidden; | ||
Matthias BUSSONNIER
|
r9260 | border: 1px solid @border_color; | ||
Brian E. Granger
|
r4389 | } | ||
Brian Granger
|
r4383 | |||
Brian E. Granger
|
r4389 | .completions select { | ||
background: white; | ||||
outline: none; | ||||
border: none; | ||||
padding: 0px; | ||||
margin: 0px; | ||||
Matthias BUSSONNIER
|
r7539 | overflow: auto; | ||
Brian E. Granger
|
r4389 | font-family: monospace; | ||
} | ||||
Brian Granger
|
r4383 | |||
Matthias BUSSONNIER
|
r7131 | option.context { | ||
background-color: #DEF7FF; | ||||
} | ||||
option.introspection { | ||||
background-color: #EBF4EB; | ||||
} | ||||
Matthias BUSSONNIER
|
r5637 | /*fixed part of the completion*/ | ||
Brian Granger
|
r5857 | .completions p b { | ||
Matthias BUSSONNIER
|
r5637 | font-weight:bold; | ||
} | ||||
Brian Granger
|
r5857 | .completions p { | ||
Matthias BUSSONNIER
|
r5507 | background: #DDF; | ||
/*outline: none; | ||||
padding: 0px;*/ | ||||
border-bottom: black solid 1px; | ||||
padding: 1px; | ||||
font-family: monospace; | ||||
} | ||||
MinRK
|
r5547 | pre.dialog { | ||
Matthias BUSSONNIER
|
r9260 | background-color: @cell_background; | ||
MinRK
|
r5547 | border: 1px solid #ddd; | ||
Matthias BUSSONNIER
|
r9261 | .corner-all; | ||
MinRK
|
r5547 | padding: 0.4em; | ||
padding-left: 2em; | ||||
} | ||||
Brian Granger
|
r5857 | p.dialog { | ||
MinRK
|
r5547 | padding : 0.2em; | ||
} | ||||
Stefan van der Walt
|
r4650 | .shortcut_key { | ||
display: inline-block; | ||||
Brian Granger
|
r5858 | width: 15ex; | ||
Stefan van der Walt
|
r4650 | text-align: right; | ||
Fernando Perez
|
r5019 | font-family: monospace; | ||
Stefan van der Walt
|
r4650 | } | ||
.shortcut_descr { | ||||
Fernando Perez
|
r5025 | } | ||
Fernando Perez
|
r5256 | |||
/* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems | ||||
to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do. | ||||
*/ | ||||
pre, code, kbd, samp { white-space: pre-wrap; } | ||||
mcelrath
|
r7394 | |||
#fonttest { | ||||
font-family: monospace; | ||||
} | ||||
MinRK
|
r8052 | |||
MinRK
|
r8068 | .js-error { | ||
MinRK
|
r8052 | color: darkred; | ||
Bussonnier Matthias
|
r8290 | } | ||
Matthias BUSSONNIER
|
r9261 | |||
Matthias BUSSONNIER
|
r9367 | a { | ||
text-decoration: underline; | ||||
} | ||||
Matthias BUSSONNIER
|
r9261 | |||
Matthias BUSSONNIER
|
r9369 | p { | ||
margin-bottom:0; | ||||
} | ||||