nbsphinx-code-cells.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. /* remove conflicting styling from Sphinx themes */
  2. div.nbinput.container div.prompt *,
  3. div.nboutput.container div.prompt *,
  4. div.nbinput.container div.input_area pre,
  5. div.nboutput.container div.output_area pre,
  6. div.nbinput.container div.input_area .highlight,
  7. div.nboutput.container div.output_area .highlight {
  8. border: none;
  9. padding: 0;
  10. margin: 0;
  11. box-shadow: none;
  12. }
  13. div.nbinput.container > div[class*=highlight],
  14. div.nboutput.container > div[class*=highlight] {
  15. margin: 0;
  16. }
  17. div.nbinput.container div.prompt *,
  18. div.nboutput.container div.prompt * {
  19. background: none;
  20. }
  21. div.nboutput.container div.output_area .highlight,
  22. div.nboutput.container div.output_area pre {
  23. background: unset;
  24. }
  25. div.nboutput.container div.output_area div.highlight {
  26. color: unset; /* override Pygments text color */
  27. }
  28. /* avoid gaps between output lines */
  29. div.nboutput.container div[class*=highlight] pre {
  30. line-height: normal;
  31. }
  32. /* input/output containers */
  33. div.nbinput.container,
  34. div.nboutput.container {
  35. display: -webkit-flex;
  36. display: flex;
  37. align-items: flex-start;
  38. margin: 0;
  39. width: 100%;
  40. }
  41. @media (max-width: 540px) {
  42. div.nbinput.container,
  43. div.nboutput.container {
  44. flex-direction: column;
  45. }
  46. }
  47. /* input container */
  48. div.nbinput.container {
  49. padding-top: 5px;
  50. }
  51. /* last container */
  52. div.nblast.container {
  53. padding-bottom: 5px;
  54. }
  55. /* input prompt */
  56. div.nbinput.container div.prompt pre,
  57. /* for sphinx_immaterial theme: */
  58. div.nbinput.container div.prompt pre > code {
  59. color: #307FC1;
  60. }
  61. /* output prompt */
  62. div.nboutput.container div.prompt pre,
  63. /* for sphinx_immaterial theme: */
  64. div.nboutput.container div.prompt pre > code {
  65. color: #BF5B3D;
  66. }
  67. /* all prompts */
  68. div.nbinput.container div.prompt,
  69. div.nboutput.container div.prompt {
  70. width: 4.5ex;
  71. padding-top: 5px;
  72. position: relative;
  73. user-select: none;
  74. }
  75. div.nbinput.container div.prompt > div,
  76. div.nboutput.container div.prompt > div {
  77. position: absolute;
  78. right: 0;
  79. margin-right: 0.3ex;
  80. }
  81. @media (max-width: 540px) {
  82. div.nbinput.container div.prompt,
  83. div.nboutput.container div.prompt {
  84. width: unset;
  85. text-align: left;
  86. padding: 0.4em;
  87. }
  88. div.nboutput.container div.prompt.empty {
  89. padding: 0;
  90. }
  91. div.nbinput.container div.prompt > div,
  92. div.nboutput.container div.prompt > div {
  93. position: unset;
  94. }
  95. }
  96. /* disable scrollbars and line breaks on prompts */
  97. div.nbinput.container div.prompt pre,
  98. div.nboutput.container div.prompt pre {
  99. overflow: hidden;
  100. white-space: pre;
  101. }
  102. /* input/output area */
  103. div.nbinput.container div.input_area,
  104. div.nboutput.container div.output_area {
  105. -webkit-flex: 1;
  106. flex: 1;
  107. overflow: auto;
  108. }
  109. @media (max-width: 540px) {
  110. div.nbinput.container div.input_area,
  111. div.nboutput.container div.output_area {
  112. width: 100%;
  113. }
  114. }
  115. /* input area */
  116. div.nbinput.container div.input_area {
  117. border: 1px solid #e0e0e0;
  118. border-radius: 2px;
  119. /*background: #f5f5f5;*/
  120. }
  121. /* override MathJax center alignment in output cells */
  122. div.nboutput.container div[class*=MathJax] {
  123. text-align: left !important;
  124. }
  125. /* override sphinx.ext.imgmath center alignment in output cells */
  126. div.nboutput.container div.math p {
  127. text-align: left;
  128. }
  129. /* standard error */
  130. div.nboutput.container div.output_area.stderr {
  131. background: #fdd;
  132. }
  133. /* ANSI colors */
  134. .ansi-black-fg { color: #3E424D; }
  135. .ansi-black-bg { background-color: #3E424D; }
  136. .ansi-black-intense-fg { color: #282C36; }
  137. .ansi-black-intense-bg { background-color: #282C36; }
  138. .ansi-red-fg { color: #E75C58; }
  139. .ansi-red-bg { background-color: #E75C58; }
  140. .ansi-red-intense-fg { color: #B22B31; }
  141. .ansi-red-intense-bg { background-color: #B22B31; }
  142. .ansi-green-fg { color: #00A250; }
  143. .ansi-green-bg { background-color: #00A250; }
  144. .ansi-green-intense-fg { color: #007427; }
  145. .ansi-green-intense-bg { background-color: #007427; }
  146. .ansi-yellow-fg { color: #DDB62B; }
  147. .ansi-yellow-bg { background-color: #DDB62B; }
  148. .ansi-yellow-intense-fg { color: #B27D12; }
  149. .ansi-yellow-intense-bg { background-color: #B27D12; }
  150. .ansi-blue-fg { color: #208FFB; }
  151. .ansi-blue-bg { background-color: #208FFB; }
  152. .ansi-blue-intense-fg { color: #0065CA; }
  153. .ansi-blue-intense-bg { background-color: #0065CA; }
  154. .ansi-magenta-fg { color: #D160C4; }
  155. .ansi-magenta-bg { background-color: #D160C4; }
  156. .ansi-magenta-intense-fg { color: #A03196; }
  157. .ansi-magenta-intense-bg { background-color: #A03196; }
  158. .ansi-cyan-fg { color: #60C6C8; }
  159. .ansi-cyan-bg { background-color: #60C6C8; }
  160. .ansi-cyan-intense-fg { color: #258F8F; }
  161. .ansi-cyan-intense-bg { background-color: #258F8F; }
  162. .ansi-white-fg { color: #C5C1B4; }
  163. .ansi-white-bg { background-color: #C5C1B4; }
  164. .ansi-white-intense-fg { color: #A1A6B2; }
  165. .ansi-white-intense-bg { background-color: #A1A6B2; }
  166. .ansi-default-inverse-fg { color: #FFFFFF; }
  167. .ansi-default-inverse-bg { background-color: #000000; }
  168. .ansi-bold { font-weight: bold; }
  169. .ansi-underline { text-decoration: underline; }
  170. div.nbinput.container div.input_area div[class*=highlight] > pre,
  171. div.nboutput.container div.output_area div[class*=highlight] > pre,
  172. div.nboutput.container div.output_area div[class*=highlight].math,
  173. div.nboutput.container div.output_area.rendered_html,
  174. div.nboutput.container div.output_area > div.output_javascript,
  175. div.nboutput.container div.output_area:not(.rendered_html) > img{
  176. padding: 5px;
  177. margin: 0;
  178. }
  179. /* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
  180. div.nbinput.container div.input_area > div[class^='highlight'],
  181. div.nboutput.container div.output_area > div[class^='highlight']{
  182. overflow-y: hidden;
  183. }
  184. /* hide copy button on prompts for 'sphinx_copybutton' extension ... */
  185. .prompt .copybtn,
  186. /* ... and 'sphinx_immaterial' theme */
  187. .prompt .md-clipboard.md-icon {
  188. display: none;
  189. }
  190. /* Some additional styling taken form the Jupyter notebook CSS */
  191. .jp-RenderedHTMLCommon table,
  192. div.rendered_html table {
  193. border: none;
  194. border-collapse: collapse;
  195. border-spacing: 0;
  196. color: black;
  197. font-size: 12px;
  198. table-layout: fixed;
  199. }
  200. .jp-RenderedHTMLCommon thead,
  201. div.rendered_html thead {
  202. border-bottom: 1px solid black;
  203. vertical-align: bottom;
  204. }
  205. .jp-RenderedHTMLCommon tr,
  206. .jp-RenderedHTMLCommon th,
  207. .jp-RenderedHTMLCommon td,
  208. div.rendered_html tr,
  209. div.rendered_html th,
  210. div.rendered_html td {
  211. text-align: right;
  212. vertical-align: middle;
  213. padding: 0.5em 0.5em;
  214. line-height: normal;
  215. white-space: normal;
  216. max-width: none;
  217. border: none;
  218. }
  219. .jp-RenderedHTMLCommon th,
  220. div.rendered_html th {
  221. font-weight: bold;
  222. }
  223. .jp-RenderedHTMLCommon tbody tr:nth-child(odd),
  224. div.rendered_html tbody tr:nth-child(odd) {
  225. background: #f5f5f5;
  226. }
  227. .jp-RenderedHTMLCommon tbody tr:hover,
  228. div.rendered_html tbody tr:hover {
  229. background: rgba(66, 165, 245, 0.2);
  230. }