chrome.css 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. /* CSS for UI elements (a.k.a. chrome) */
  2. @import 'variables.css';
  3. ::-webkit-scrollbar {
  4. background: var(--bg);
  5. }
  6. ::-webkit-scrollbar-thumb {
  7. background: var(--scrollbar);
  8. }
  9. html {
  10. scrollbar-color: var(--scrollbar) var(--bg);
  11. }
  12. #searchresults a,
  13. .content a:link,
  14. a:visited,
  15. a > .hljs {
  16. color: var(--links);
  17. }
  18. /* Menu Bar */
  19. #menu-bar,
  20. #menu-bar-hover-placeholder {
  21. z-index: 101;
  22. margin: auto calc(0px - var(--page-padding));
  23. }
  24. #menu-bar {
  25. position: relative;
  26. display: flex;
  27. flex-wrap: wrap;
  28. background-color: var(--bg);
  29. border-bottom-color: var(--bg);
  30. border-bottom-width: 1px;
  31. border-bottom-style: solid;
  32. }
  33. #menu-bar.sticky,
  34. .js #menu-bar-hover-placeholder:hover + #menu-bar,
  35. .js #menu-bar:hover,
  36. .js.sidebar-visible #menu-bar {
  37. position: -webkit-sticky;
  38. position: sticky;
  39. top: 0 !important;
  40. }
  41. #menu-bar-hover-placeholder {
  42. position: sticky;
  43. position: -webkit-sticky;
  44. top: 0;
  45. height: var(--menu-bar-height);
  46. }
  47. #menu-bar.bordered {
  48. border-bottom-color: var(--table-border-color);
  49. }
  50. #menu-bar i, #menu-bar .icon-button {
  51. position: relative;
  52. padding: 0 8px;
  53. z-index: 10;
  54. line-height: var(--menu-bar-height);
  55. cursor: pointer;
  56. transition: color 0.5s;
  57. }
  58. @media only screen and (max-width: 420px) {
  59. #menu-bar i, #menu-bar .icon-button {
  60. padding: 0 5px;
  61. }
  62. }
  63. .icon-button {
  64. border: none;
  65. background: none;
  66. padding: 0;
  67. color: inherit;
  68. }
  69. .icon-button i {
  70. margin: 0;
  71. }
  72. .right-buttons {
  73. margin: 0 15px;
  74. font-size: 12pt;
  75. }
  76. .right-buttons a {
  77. text-decoration: none;
  78. }
  79. .left-buttons {
  80. display: flex;
  81. margin: 0 5px;
  82. }
  83. .no-js .left-buttons {
  84. display: none;
  85. }
  86. .menu-title {
  87. display: inline-block;
  88. font-weight: 300;
  89. font-size: 2.4rem;
  90. line-height: var(--menu-bar-height);
  91. text-align: center;
  92. margin: 0;
  93. flex: 1;
  94. white-space: nowrap;
  95. overflow: hidden;
  96. text-overflow: ellipsis;
  97. }
  98. .js .menu-title {
  99. cursor: pointer;
  100. }
  101. .menu-bar,
  102. .menu-bar:visited,
  103. .nav-page,
  104. .nav-page:visited,
  105. .mobile-nav-chapters,
  106. .mobile-nav-chapters:visited,
  107. .menu-bar .icon-button,
  108. .menu-bar a i {
  109. color: var(--icons);
  110. }
  111. /* Nav Icons */
  112. .nav-page {
  113. font-size: 2.5em;
  114. text-align: center;
  115. text-decoration: none;
  116. position: fixed;
  117. top: 0;
  118. bottom: 0;
  119. margin: 0;
  120. width: 30px;
  121. display: flex;
  122. justify-content: center;
  123. align-content: center;
  124. flex-direction: column;
  125. transition: color 0.5s, background-color 0.5s;
  126. border: none;
  127. background-color: transparent;
  128. }
  129. @media screen and (min-width: 1140px) {
  130. .nav-page {
  131. width: 50px;
  132. }
  133. }
  134. @media (hover: hover) {
  135. .nav-page:hover {
  136. text-decoration: none;
  137. background-color: var(--theme-hover);
  138. transition: background-color 0.15s, color 0.15s;
  139. }
  140. .menu-bar i:hover,
  141. .menu-bar .icon-button:hover,
  142. .nav-page:hover,
  143. .mobile-nav-chapters i:hover {
  144. color: var(--icons-hover);
  145. }
  146. }
  147. .nav-wrapper {
  148. margin-top: 50px;
  149. display: none;
  150. }
  151. .mobile-nav-chapters {
  152. font-size: 2.5em;
  153. text-align: center;
  154. text-decoration: none;
  155. width: 90px;
  156. border-radius: 5px;
  157. background-color: var(--sidebar-bg);
  158. }
  159. .previous {
  160. float: left;
  161. }
  162. .next {
  163. float: right;
  164. right: 0;
  165. }
  166. /* Inline code */
  167. :not(pre) > .hljs {
  168. display: inline;
  169. padding: 0.1em 0.3em;
  170. border-radius: 3px;
  171. }
  172. :not(pre):not(a) > .hljs {
  173. color: var(--inline-code-color);
  174. overflow-x: initial;
  175. }
  176. a:hover > .hljs {
  177. text-decoration: underline;
  178. }
  179. pre {
  180. position: relative;
  181. }
  182. pre > .buttons {
  183. position: absolute;
  184. z-index: 100;
  185. right: 5px;
  186. top: 5px;
  187. color: var(--sidebar-fg);
  188. cursor: pointer;
  189. }
  190. pre > .buttons :hover {
  191. color: var(--sidebar-active);
  192. }
  193. pre > .buttons i {
  194. margin-left: 8px;
  195. }
  196. pre > .buttons button {
  197. color: inherit;
  198. background: transparent;
  199. border: none;
  200. cursor: inherit;
  201. }
  202. pre > .result {
  203. margin-top: 10px;
  204. }
  205. /* Search */
  206. #searchresults a {
  207. text-decoration: none;
  208. }
  209. mark {
  210. border-radius: 2px;
  211. padding: 0 3px 1px 3px;
  212. margin: 0 -3px -1px -3px;
  213. background-color: var(--search-mark-bg);
  214. transition: background-color 300ms linear;
  215. cursor: pointer;
  216. }
  217. mark.fade-out {
  218. background-color: rgba(0,0,0,0) !important;
  219. cursor: auto;
  220. }
  221. .searchbar-outer {
  222. margin-left: auto;
  223. margin-right: auto;
  224. max-width: var(--content-max-width);
  225. }
  226. #searchbar {
  227. width: 100%;
  228. margin: 5px auto 0px auto;
  229. padding: 10px 16px;
  230. transition: box-shadow 300ms ease-in-out;
  231. border: 1px solid var(--searchbar-border-color);
  232. border-radius: 3px;
  233. background-color: var(--searchbar-bg);
  234. color: var(--searchbar-fg);
  235. }
  236. #searchbar:focus,
  237. #searchbar.active {
  238. box-shadow: 0 0 3px var(--searchbar-shadow-color);
  239. }
  240. .searchresults-header {
  241. font-weight: bold;
  242. font-size: 1em;
  243. padding: 18px 0 0 5px;
  244. color: var(--searchresults-header-fg);
  245. }
  246. .searchresults-outer {
  247. margin-left: auto;
  248. margin-right: auto;
  249. max-width: var(--content-max-width);
  250. border-bottom: 1px dashed var(--searchresults-border-color);
  251. }
  252. ul#searchresults {
  253. list-style: none;
  254. padding-left: 20px;
  255. }
  256. ul#searchresults li {
  257. margin: 10px 0px;
  258. padding: 2px;
  259. border-radius: 2px;
  260. }
  261. ul#searchresults li.focus {
  262. background-color: var(--searchresults-li-bg);
  263. }
  264. ul#searchresults span.teaser {
  265. display: block;
  266. clear: both;
  267. margin: 5px 0 0 20px;
  268. font-size: 0.8em;
  269. }
  270. ul#searchresults span.teaser em {
  271. font-weight: bold;
  272. font-style: normal;
  273. }
  274. /* Sidebar */
  275. .sidebar {
  276. position: fixed;
  277. left: 0;
  278. top: 0;
  279. bottom: 0;
  280. width: var(--sidebar-width);
  281. font-size: 0.875em;
  282. box-sizing: border-box;
  283. -webkit-overflow-scrolling: touch;
  284. overscroll-behavior-y: contain;
  285. background-color: var(--sidebar-bg);
  286. color: var(--sidebar-fg);
  287. }
  288. .sidebar-resizing {
  289. -moz-user-select: none;
  290. -webkit-user-select: none;
  291. -ms-user-select: none;
  292. user-select: none;
  293. }
  294. .js:not(.sidebar-resizing) .sidebar {
  295. transition: transform 0.3s; /* Animation: slide away */
  296. }
  297. .sidebar code {
  298. line-height: 2em;
  299. }
  300. .sidebar .sidebar-scrollbox {
  301. overflow-y: auto;
  302. position: absolute;
  303. top: 0;
  304. bottom: 0;
  305. left: 0;
  306. right: 0;
  307. padding: 10px 10px;
  308. }
  309. .sidebar .sidebar-resize-handle {
  310. position: absolute;
  311. cursor: col-resize;
  312. width: 0;
  313. right: 0;
  314. top: 0;
  315. bottom: 0;
  316. }
  317. .js .sidebar .sidebar-resize-handle {
  318. cursor: col-resize;
  319. width: 5px;
  320. }
  321. .sidebar-hidden .sidebar {
  322. transform: translateX(calc(0px - var(--sidebar-width)));
  323. }
  324. .sidebar::-webkit-scrollbar {
  325. background: var(--sidebar-bg);
  326. }
  327. .sidebar::-webkit-scrollbar-thumb {
  328. background: var(--scrollbar);
  329. }
  330. .sidebar-visible .page-wrapper {
  331. transform: translateX(var(--sidebar-width));
  332. }
  333. @media only screen and (min-width: 620px) {
  334. .sidebar-visible .page-wrapper {
  335. transform: none;
  336. margin-left: var(--sidebar-width);
  337. }
  338. }
  339. .chapter {
  340. list-style: none outside none;
  341. padding-left: 0;
  342. line-height: 2.2em;
  343. }
  344. .chapter ol {
  345. width: 100%;
  346. }
  347. .chapter li {
  348. display: flex;
  349. color: var(--sidebar-non-existant);
  350. }
  351. .chapter li a {
  352. display: block;
  353. padding: 0;
  354. text-decoration: none;
  355. color: var(--sidebar-fg);
  356. }
  357. .chapter li a:hover {
  358. color: var(--sidebar-active);
  359. }
  360. .chapter li a.active {
  361. color: var(--sidebar-active);
  362. }
  363. .chapter li > a.toggle {
  364. cursor: pointer;
  365. display: block;
  366. margin-left: auto;
  367. padding: 0 10px;
  368. user-select: none;
  369. opacity: 0.68;
  370. }
  371. .chapter li > a.toggle div {
  372. transition: transform 0.5s;
  373. }
  374. /* collapse the section */
  375. .chapter li:not(.expanded) + li > ol {
  376. display: none;
  377. }
  378. .chapter li.chapter-item {
  379. line-height: 1.5em;
  380. margin-top: 0.6em;
  381. }
  382. .chapter li.expanded > a.toggle div {
  383. transform: rotate(90deg);
  384. }
  385. .spacer {
  386. width: 100%;
  387. height: 3px;
  388. margin: 5px 0px;
  389. }
  390. .chapter .spacer {
  391. background-color: var(--sidebar-spacer);
  392. }
  393. @media (-moz-touch-enabled: 1), (pointer: coarse) {
  394. .chapter li a { padding: 5px 0; }
  395. .spacer { margin: 10px 0; }
  396. }
  397. .section {
  398. list-style: none outside none;
  399. padding-left: 20px;
  400. line-height: 1.9em;
  401. }
  402. /* Popup menues */
  403. .popup {
  404. position: absolute;
  405. top: calc( var(--menu-bar-height) + 2px );
  406. z-index: 1000;
  407. border-radius: 4px;
  408. font-size: 0.7em;
  409. color: var(--fg);
  410. background: var(--theme-popup-bg);
  411. border: 1px solid var(--theme-popup-border);
  412. margin: 0;
  413. padding: 0;
  414. list-style: none;
  415. display: none;
  416. }
  417. .popup#theme-list { left: 50px; }
  418. .popup#font-size-list { left: 100px; }
  419. .popup#font-family-list { left: 150px; }
  420. @media only screen and (max-width: 420px) {
  421. .popup#theme-list { left: 40px; }
  422. .popup#font-size-list { left: 75px; }
  423. .popup#font-family-list { left: 110px; }
  424. }
  425. .popup .default {
  426. color: var(--icons);
  427. }
  428. .popup .item{
  429. width: 100%;
  430. border: 0;
  431. margin: 0;
  432. padding: 2px 10px;
  433. line-height: 25px;
  434. white-space: nowrap;
  435. text-align: left;
  436. cursor: pointer;
  437. color: inherit;
  438. background: inherit;
  439. font-size: inherit;
  440. }
  441. .popup .item:hover {
  442. background-color: var(--theme-hover);
  443. }
  444. .popup .item:hover:first-child,
  445. .popup .item:hover:last-child {
  446. border-top-left-radius: inherit;
  447. border-top-right-radius: inherit;
  448. }
  449. .page-position {
  450. position: fixed;
  451. bottom: 0;
  452. width: 100%;
  453. }
  454. .page-position div {
  455. height: 3px;
  456. background-color: var(--sidebar-active);
  457. }
  458. html.hide-scrollbar body::-webkit-scrollbar {
  459. display: none;
  460. }
  461. html.hide-scrollbar {
  462. -ms-overflow-style: none;
  463. scrollbar-width: none;
  464. }
  465. .fa {
  466. margin: 0 auto;
  467. }