index.css 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. /*-----------------------------------------------------------------------------
  6. | Table of Contents
  7. |----------------------------------------------------------------------------*/
  8. .jp-TableOfContents-content {
  9. flex: 1 1 auto;
  10. margin: 0;
  11. padding: 0;
  12. list-style-type: none;
  13. overflow: auto;
  14. background-color: var(--jp-layout-color1);
  15. }
  16. .jp-TableOfContents-content li {
  17. display: flex;
  18. flex-direction: row;
  19. padding: 4px 12px;
  20. -webkit-user-select: none;
  21. -moz-user-select: none;
  22. -ms-user-select: none;
  23. user-select: none;
  24. cursor: pointer;
  25. padding-top: 8px;
  26. padding-bottom: 8px;
  27. }
  28. .jp-TableOfContents-content li:hover {
  29. background: var(--jp-layout-color2);
  30. }
  31. .jp-TableOfContents {
  32. display: flex;
  33. flex-direction: column;
  34. background: var(--jp-layout-color1);
  35. color: var(--jp-ui-font-color1);
  36. font-size: var(--jp-ui-font-size0);
  37. height: 100%;
  38. }
  39. .jp-TableOfContents header {
  40. border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
  41. flex: 0 0 auto;
  42. font-size: var(--jp-ui-font-size0);
  43. font-weight: 600;
  44. letter-spacing: 1px;
  45. margin: 0px;
  46. padding: 12px 0 4px 12px;
  47. text-transform: uppercase;
  48. }
  49. [data-theme-light='true'] .jp-TableOfContents-icon {
  50. background-image: url(list-light.svg);
  51. }
  52. [data-theme-light='false'] .jp-TableOfContents-icon {
  53. background-image: url(list-dark.svg);
  54. }
  55. .jp-TableOfContents-codeContainer {
  56. overflow: hidden;
  57. }
  58. .jp-TableOfContents-code {
  59. font-size: 9px;
  60. max-height: 70px;
  61. }
  62. .cm-toc .CodeMirror {
  63. font-size: 9px;
  64. z-index: 0;
  65. border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  66. border-radius: 0px;
  67. background: var(--jp-cell-editor-background);
  68. max-width: 100%;
  69. max-height: 36px;
  70. }
  71. .toc-code-span {
  72. width: 100%;
  73. max-width: 100%;
  74. overflow: hidden;
  75. }
  76. .cm-toc .CodeMirror-scroll {
  77. overflow: hidden !important;
  78. }
  79. .CodeMirror-scroll::-webkit-scrollbar-track {
  80. background-color: transparent;
  81. }
  82. .toc-toolbar-icon,
  83. .toc-toolbar-icon-selected {
  84. float: left;
  85. padding: 0px;
  86. margin: 4px;
  87. background-repeat: no-repeat;
  88. height: 28px;
  89. width: 28px;
  90. margin: 4px;
  91. background-color: none;
  92. border-radius: 2px;
  93. }
  94. [data-theme-light='true'] .toc-toolbar-code-icon {
  95. background-image: url('img/code.svg');
  96. }
  97. [data-theme-light='false'] .toc-toolbar-code-icon {
  98. background-image: url('img/code_darktheme.svg');
  99. }
  100. [data-theme-light='true'] .toc-toolbar-markdown-icon {
  101. background-image: url('img/markdown.svg');
  102. }
  103. [data-theme-light='false'] .toc-toolbar-markdown-icon {
  104. background-image: url('img/markdown_darktheme.svg');
  105. }
  106. [data-theme-light='true'] .toc-toolbar-auto-numbering-icon {
  107. background-image: url('img/autonumbering.svg');
  108. }
  109. [data-theme-light='false'] .toc-toolbar-auto-numbering-icon {
  110. background-image: url('img/autonumbering_darktheme.svg');
  111. }
  112. .toc-toolbar-tag-icon {
  113. width: 43px;
  114. float: right;
  115. margin: 4px;
  116. margin-right: 9px;
  117. }
  118. [data-theme-light='true'] .toc-toolbar-tag-icon {
  119. background-image: url('img/tag.svg');
  120. }
  121. [data-theme-light='false'] .toc-toolbar-tag-icon {
  122. background-image: url('img/tag_darktheme.svg');
  123. }
  124. [data-theme-light='true'] .toc-toolbar-icon:hover {
  125. background-color: var(--jp-input-background);
  126. }
  127. [data-theme-light='false'] .toc-toolbar-icon:hover {
  128. background-color: #3a3a3a;
  129. }
  130. [data-theme-light='true'] .toc-toolbar-icon-selected {
  131. background-color: var(--jp-layout-color2);
  132. }
  133. [data-theme-light='false'] .toc-toolbar-icon-selected {
  134. background-color: #565656;
  135. }
  136. .toc-code-cell-prompt {
  137. flex: 0 0 27px;
  138. color: var(--jp-cell-prompt-not-active-font-color);
  139. opacity: var(--jp-cell-prompt-not-active-opacity);
  140. font-family: var(--jp-cell-prompt-font-family);
  141. padding: var(--jp-code-padding);
  142. padding-right: 0px;
  143. padding-left: 0px;
  144. letter-spacing: var(--jp-cell-prompt-letter-spacing);
  145. line-height: var(--jp-code-line-height);
  146. font-size: 8px;
  147. border: var(--jp-border-width) solid transparent;
  148. text-align: left;
  149. white-space: nowrap;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. -webkit-user-select: none;
  153. -moz-user-select: none;
  154. -ms-user-select: none;
  155. user-select: none;
  156. }
  157. .toc-toolbar {
  158. position: relative;
  159. width: 100%;
  160. padding: 3px;
  161. margin: 0px;
  162. user-select: none;
  163. padding-top: 0px;
  164. border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
  165. height: 33px;
  166. }
  167. .toc-code-cell-div {
  168. display: inline-flex;
  169. width: 100%;
  170. }
  171. .toc-entry-holder {
  172. display: inline-flex;
  173. position: relative;
  174. align-items: center;
  175. width: 100%;
  176. }
  177. .toc-collapse-button {
  178. padding-left: 3px;
  179. cursor: default;
  180. min-width: 11px;
  181. position: absolute;
  182. }
  183. .toc-arrow-img {
  184. top: 0;
  185. bottom: 0;
  186. margin: auto;
  187. position: absolute;
  188. background-repeat: no-repeat;
  189. }
  190. .toc-downarrow-img {
  191. width: 12px;
  192. height: 6px;
  193. }
  194. [data-theme-light='true'] .toc-downarrow-img {
  195. background-image: url('img/toggle_down.svg');
  196. }
  197. [data-theme-light='false'] .toc-downarrow-img {
  198. background-image: url('img/toggle_down_darktheme.svg');
  199. }
  200. .toc-rightarrow-img {
  201. width: 7px;
  202. height: 12px;
  203. }
  204. [data-theme-light='true'] .toc-rightarrow-img {
  205. background-image: url('img/toggle_right.svg');
  206. }
  207. [data-theme-light='false'] .toc-rightarrow-img {
  208. background-image: url('img/toggle_right_darktheme.svg');
  209. }
  210. .toc-twist-placeholder {
  211. max-width: 10px;
  212. opacity: 0;
  213. overflow: hidden;
  214. }
  215. .cm-toc-plain-span {
  216. width: 100%;
  217. white-space: pre-wrap;
  218. display: block;
  219. }
  220. .cm-toc-plain-textarea {
  221. font-size: 9px;
  222. z-index: 0;
  223. border: var(--jp-border-width) solid var(--jp-cell-editor-border-color);
  224. border-radius: 0px;
  225. background: var(--jp-cell-editor-background);
  226. width: calc(100% - 9px);
  227. overflow: hidden;
  228. max-height: 74px;
  229. resize: none;
  230. font-family: var(--jp-code-font-family);
  231. outline: none;
  232. user-select: none;
  233. white-space: pre;
  234. padding: var(--jp-code-padding);
  235. }
  236. .cm-toc .CodeMirror-sizer {
  237. min-width: 0px !important;
  238. min-height: 0px !important;
  239. margin-bottom: 0px !important;
  240. }
  241. .cm-toc .CodeMirror-line {
  242. white-space: pre-wrap;
  243. cursor: pointer;
  244. }
  245. .cm-toc .CodeMirror-lines {
  246. cursor: pointer;
  247. }
  248. .toc-tag-dropdown {
  249. position: relative;
  250. width: 100%;
  251. padding: 5px;
  252. padding-bottom: 0px;
  253. margin-bottom: 8px;
  254. -webkit-box-shadow: 0 9px 4px -7px var(--jp-layout-color2);
  255. -moz-box-shadow: 0 9px 4px -7px var(--jp-layout-color2);
  256. box-shadow: 0 9px 4px -7px var(--jp-layout-color2);
  257. display: flex;
  258. padding-left: 0px;
  259. }
  260. .toc-clear-button {
  261. font-size: 12px;
  262. color: var(--jp-ui-font-color1);
  263. padding-left: 15px;
  264. padding-top: 7px;
  265. user-select: none;
  266. }
  267. .toc-clear-button:hover {
  268. font-size: 12px;
  269. color: var(--jp-ui-font-color2);
  270. padding-left: 15px;
  271. padding-top: 7px;
  272. user-select: none;
  273. }
  274. .toc-select-button {
  275. background-color: var(--jp-layout-color1);
  276. border: solid 1px var(--jp-layout-color4);
  277. border-radius: 3px;
  278. width: fit-content;
  279. padding: 5px;
  280. padding-left: 10px;
  281. padding-right: 10px;
  282. margin-right: 17px;
  283. color: var(--jp-layout-color5);
  284. float: right;
  285. font-size: 12px;
  286. user-select: none;
  287. }
  288. .toc-filter-button {
  289. background-color: var(--jp-layout-color4);
  290. border: solid 1px var(--jp-layout-color4);
  291. border-radius: 3px;
  292. width: fit-content;
  293. padding: 5px;
  294. padding-left: 10px;
  295. padding-right: 10px;
  296. margin-right: 15px;
  297. color: var(--jp-layout-color1);
  298. float: right;
  299. font-size: 12px;
  300. user-select: none;
  301. margin-bottom: 13px;
  302. }
  303. .toc-no-tags-div {
  304. font-size: 12px;
  305. padding: 3px;
  306. padding-bottom: 6px;
  307. margin: auto;
  308. color: var(--jp-layout-color4);
  309. }
  310. .toc-tags-container {
  311. width: 100%;
  312. }
  313. .jp-TableOfContents-content code {
  314. font-size: inherit;
  315. }
  316. .toc-cell-item {
  317. padding-left: 24px;
  318. }
  319. /* styles for tags */
  320. .toc-tag-label {
  321. font-size: 11px;
  322. max-width: 100%;
  323. text-overflow: ellipsis;
  324. display: inline-block;
  325. overflow: hidden;
  326. box-sizing: border-box;
  327. padding-top: 0px;
  328. margin-top: -1px;
  329. margin-bottom: 0px;
  330. user-select: none;
  331. }
  332. .toc-tag {
  333. box-sizing: border-box;
  334. height: 24px;
  335. border-radius: 20px;
  336. padding: 10px;
  337. padding-bottom: 4px;
  338. padding-top: 3px;
  339. margin: 3px;
  340. width: fit-content;
  341. max-width: calc(100% - 25px);
  342. }
  343. .toc-selected-tag {
  344. color: white;
  345. background-color: #2196f3;
  346. outline: none;
  347. }
  348. .toc-unselected-tag {
  349. background-color: var(--jp-layout-color2);
  350. outline: none;
  351. }
  352. .toc-tag-holder {
  353. display: flex;
  354. flex-wrap: wrap;
  355. height: fit-content;
  356. margin-bottom: 20px;
  357. padding-right: 20px;
  358. padding-left: 9px;
  359. padding-top: 6px;
  360. }
  361. /* Font level sizes */
  362. .toc-level-size-1 {
  363. font-size: 16.89px;
  364. }
  365. .toc-level-size-2 {
  366. font-size: 14.82px;
  367. }
  368. .toc-level-size-3 {
  369. font-size: 13px;
  370. }
  371. .toc-level-size-4 {
  372. font-size: 11.4px;
  373. }
  374. .toc-level-size-5 {
  375. font-size: 10px;
  376. }
  377. .toc-level-size-6 {
  378. font-size: 9px;
  379. }
  380. .toc-level-size-default {
  381. font-size: 9px;
  382. }