chrome.css 9.1 KB

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