index.css 8.3 KB

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