Changeset View
Changeset View
Standalone View
Standalone View
swh/web/assets/src/bundles/webapp/notebook.css
- This file was added.
/** | |||||
* Copyright (C) 2019 The Software Heritage developers | |||||
* See the AUTHORS file at the top-level directory of this distribution | |||||
* License: GNU Affero General Public License version 3, or any later version | |||||
* See top-level LICENSE file for more information | |||||
*/ | |||||
.card { | |||||
overflow-x: visible; | |||||
} | |||||
.nb-notebook { | |||||
line-height: 1.5; | |||||
} | |||||
.nb-stdout, | |||||
.nb-stderr { | |||||
white-space: pre-wrap; | |||||
margin: 1em 0; | |||||
padding: 0.1em 0.5em; | |||||
} | |||||
.nb-stderr { | |||||
background-color: #faa; | |||||
} | |||||
.nb-cell + .nb-cell { | |||||
margin-top: 0.5em; | |||||
} | |||||
.nb-output table { | |||||
border: 1px solid #000; | |||||
border-collapse: collapse; | |||||
} | |||||
.nb-output th { | |||||
font-weight: bold; | |||||
} | |||||
.nb-output th, | |||||
.nb-output td { | |||||
border: 1px solid #000; | |||||
padding: 0.25em; | |||||
text-align: left; | |||||
vertical-align: middle; | |||||
border-collapse: collapse; | |||||
} | |||||
.nb-cell { | |||||
position: relative; | |||||
} | |||||
.nb-raw-cell { | |||||
white-space: pre-wrap; | |||||
background-color: #f5f2f0; | |||||
font-family: Consolas, Monaco, 'Andale Mono', monospace; | |||||
padding: 1em; | |||||
margin: 0.5em 0; | |||||
} | |||||
.nb-input { | |||||
border: 1px solid #cfcfcf; | |||||
border-radius: 2px; | |||||
background: #f7f7f7; | |||||
margin: 0.4em; | |||||
padding: 0; | |||||
} | |||||
pre { | |||||
margin: 0.4em !important; | |||||
border: none; | |||||
padding: 0; | |||||
background-color: transparent; | |||||
} | |||||
.nb-output { | |||||
min-height: 1em; | |||||
width: 100%; | |||||
overflow-x: auto; | |||||
border-right: 1px dotted #ccc; | |||||
} | |||||
.nb-output img { | |||||
max-width: 100%; | |||||
} | |||||
.nb-output::before, | |||||
.nb-input::before { | |||||
position: absolute; | |||||
font-family: monospace; | |||||
color: #999; | |||||
left: -7.5em; | |||||
width: 7em; | |||||
text-align: right; | |||||
} | |||||
.nb-input::before { | |||||
content: "In [" attr(data-prompt-number) "]:"; | |||||
} | |||||
.nb-output::before { | |||||
content: "Out [" attr(data-prompt-number) "]:"; | |||||
} | |||||
div[style="max-height:1000px;max-width:1500px;overflow:auto;"] { | |||||
max-height: none !important; | |||||
} | |||||
vlorentz: Why? | |||||
Done Inline ActionsI adapted https://github.com/jsvine/nbpreview/blob/master/css/vendor/notebook.css for our web application. The CSS rule div[style="max-height:1000px;max-width:1500px;overflow:auto;"] { max-height: none !important; } was related to pandas dataframe formatting. I removed it as it effectively seems weird to have such a rule here. anlambert: I adapted https://github.com/jsvine/nbpreview/blob/master/css/vendor/notebook.css for our web… | |||||
#main { | |||||
width: 99%; | |||||
max-width: 750px; | |||||
margin: 0 auto; | |||||
} | |||||
#header { | |||||
line-height: 2; | |||||
margin-bottom: 0.25em; | |||||
font-weight: bold; | |||||
} | |||||
#controls { | |||||
border: 1px dotted #ccc; | |||||
padding: 0.75em; | |||||
margin-bottom: 0.5em; | |||||
background-color: #eef; | |||||
} | |||||
#footer { | |||||
border: 1px dotted #ccc; | |||||
background-color: #eef; | |||||
font-size: 0.8em; | |||||
padding: 0.5em; | |||||
text-align: center; | |||||
} | |||||
#footer a, | |||||
#footer a:visited { | |||||
color: #07e; | |||||
} |
Why?