chrome.css 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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. #searchresults a,
  10. .content a:link,
  11. a:visited,
  12. a > .hljs {
  13. color: var(--links);
  14. }
  15. /* Menu Bar */
  16. #menu-bar {
  17. position: -webkit-sticky;
  18. position: sticky;
  19. top: 0;
  20. z-index: 101;
  21. margin: auto calc(0px - var(--page-padding));
  22. }
  23. #menu-bar > #menu-bar-sticky-container {
  24. display: flex;
  25. flex-wrap: wrap;
  26. background-color: var(--bg);
  27. border-bottom-color: var(--bg);
  28. border-bottom-width: 1px;
  29. border-bottom-style: solid;
  30. }
  31. .js #menu-bar > #menu-bar-sticky-container {
  32. transition: transform 0.3s;
  33. }
  34. #menu-bar.bordered > #menu-bar-sticky-container {
  35. border-bottom-color: var(--table-border-color);
  36. }
  37. #menu-bar i, #menu-bar .icon-button {
  38. position: relative;
  39. padding: 0 8px;
  40. z-index: 10;
  41. line-height: 50px;
  42. cursor: pointer;
  43. transition: color 0.5s;
  44. }
  45. @media only screen and (max-width: 420px) {
  46. #menu-bar i, #menu-bar .icon-button {
  47. padding: 0 5px;
  48. }
  49. }
  50. .icon-button {
  51. border: none;
  52. background: none;
  53. padding: 0;
  54. color: inherit;
  55. }
  56. .icon-button i {
  57. margin: 0;
  58. }
  59. #print-button {
  60. margin: 0 15px;
  61. }
  62. html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container {
  63. transform: translateY(-60px);
  64. }
  65. .left-buttons {
  66. display: flex;
  67. margin: 0 5px;
  68. }
  69. .no-js .left-buttons {
  70. display: none;
  71. }
  72. .menu-title {
  73. display: inline-block;
  74. font-weight: 200;
  75. font-size: 20px;
  76. line-height: 50px;
  77. text-align: center;
  78. margin: 0;
  79. flex: 1;
  80. white-space: nowrap;
  81. overflow: hidden;
  82. text-overflow: ellipsis;
  83. }
  84. .js .menu-title {
  85. cursor: pointer;
  86. }
  87. .menu-bar,
  88. .menu-bar:visited,
  89. .nav-chapters,
  90. .nav-chapters:visited,
  91. .mobile-nav-chapters,
  92. .mobile-nav-chapters:visited,
  93. .menu-bar .icon-button,
  94. .menu-bar a i {
  95. color: var(--icons);
  96. }
  97. .menu-bar i:hover,
  98. .menu-bar .icon-button:hover,
  99. .nav-chapters:hover,
  100. .mobile-nav-chapters i:hover {
  101. color: var(--icons-hover);
  102. }
  103. /* Nav Icons */
  104. .nav-chapters {
  105. font-size: 2.5em;
  106. text-align: center;
  107. text-decoration: none;
  108. position: fixed;
  109. top: 50px; /* Height of menu-bar */
  110. bottom: 0;
  111. margin: 0;
  112. max-width: 150px;
  113. min-width: 90px;
  114. display: flex;
  115. justify-content: center;
  116. align-content: center;
  117. flex-direction: column;
  118. transition: color 0.5s;
  119. }
  120. .nav-chapters:hover { text-decoration: none; }
  121. .nav-wrapper {
  122. margin-top: 50px;
  123. display: none;
  124. }
  125. .mobile-nav-chapters {
  126. font-size: 2.5em;
  127. text-align: center;
  128. text-decoration: none;
  129. width: 90px;
  130. border-radius: 5px;
  131. background-color: var(--sidebar-bg);
  132. }
  133. .previous {
  134. float: left;
  135. }
  136. .next {
  137. float: right;
  138. right: var(--page-padding);
  139. }
  140. @media only screen and (max-width: 1080px) {
  141. .nav-wide-wrapper { display: none; }
  142. .nav-wrapper { display: block; }
  143. }
  144. @media only screen and (max-width: 1380px) {
  145. .sidebar-visible .nav-wide-wrapper { display: none; }
  146. .sidebar-visible .nav-wrapper { display: block; }
  147. }
  148. /* Inline code */
  149. :not(pre) > .hljs {
  150. display: inline-block;
  151. vertical-align: middle;
  152. padding: 0.1em 0.3em;
  153. border-radius: 3px;
  154. color: var(--inline-code-color);
  155. }
  156. a:hover > .hljs {
  157. text-decoration: underline;
  158. }
  159. pre {
  160. position: relative;
  161. }
  162. pre > .buttons {
  163. position: absolute;
  164. z-index: 100;
  165. right: 5px;
  166. top: 5px;
  167. color: var(--sidebar-fg);
  168. cursor: pointer;
  169. }
  170. pre > .buttons :hover {
  171. color: var(--sidebar-active);
  172. }
  173. pre > .buttons i {
  174. margin-left: 8px;
  175. }
  176. pre > .buttons button {
  177. color: inherit;
  178. background: transparent;
  179. border: none;
  180. cursor: inherit;
  181. }
  182. pre > .result {
  183. margin-top: 10px;
  184. }
  185. /* Search */
  186. #searchresults a {
  187. text-decoration: none;
  188. }
  189. mark {
  190. border-radius: 2px;
  191. padding: 0 3px 1px 3px;
  192. margin: 0 -3px -1px -3px;
  193. background-color: var(--search-mark-bg);
  194. transition: background-color 300ms linear;
  195. cursor: pointer;
  196. }
  197. mark.fade-out {
  198. background-color: rgba(0,0,0,0) !important;
  199. cursor: auto;
  200. }
  201. .searchbar-outer {
  202. margin-left: auto;
  203. margin-right: auto;
  204. max-width: var(--content-max-width);
  205. }
  206. #searchbar {
  207. width: 100%;
  208. margin: 5px auto 0px auto;
  209. padding: 10px 16px;
  210. transition: box-shadow 300ms ease-in-out;
  211. border: 1px solid var(--searchbar-border-color);
  212. border-radius: 3px;
  213. background-color: var(--searchbar-bg);
  214. color: var(--searchbar-fg);
  215. }
  216. #searchbar:focus,
  217. #searchbar.active {
  218. box-shadow: 0 0 3px var(--searchbar-shadow-color);
  219. }
  220. .searchresults-header {
  221. font-weight: bold;
  222. font-size: 1em;
  223. padding: 18px 0 0 5px;
  224. color: var(--searchresults-header-fg);
  225. }
  226. .searchresults-outer {
  227. margin-left: auto;
  228. margin-right: auto;
  229. max-width: var(--content-max-width);
  230. border-bottom: 1px dashed var(--searchresults-border-color);
  231. }
  232. ul#searchresults {
  233. list-style: none;
  234. padding-left: 20px;
  235. }
  236. ul#searchresults li {
  237. margin: 10px 0px;
  238. padding: 2px;
  239. border-radius: 2px;
  240. }
  241. ul#searchresults li.focus {
  242. background-color: var(--searchresults-li-bg);
  243. }
  244. ul#searchresults span.teaser {
  245. display: block;
  246. clear: both;
  247. margin: 5px 0 0 20px;
  248. font-size: 0.8em;
  249. }
  250. ul#searchresults span.teaser em {
  251. font-weight: bold;
  252. font-style: normal;
  253. }
  254. /* Sidebar */
  255. .sidebar {
  256. position: fixed;
  257. left: 0;
  258. top: 0;
  259. bottom: 0;
  260. width: var(--sidebar-width);
  261. overflow-y: auto;
  262. padding: 10px 10px;
  263. font-size: 0.875em;
  264. box-sizing: border-box;
  265. -webkit-overflow-scrolling: touch;
  266. overscroll-behavior-y: contain;
  267. background-color: var(--sidebar-bg);
  268. color: var(--sidebar-fg);
  269. }
  270. .js .sidebar {
  271. transition: transform 0.3s; /* Animation: slide away */
  272. }
  273. .sidebar code {
  274. line-height: 2em;
  275. }
  276. .sidebar-hidden .sidebar {
  277. transform: translateX(calc(0px - var(--sidebar-width)));
  278. }
  279. .sidebar::-webkit-scrollbar {
  280. background: var(--sidebar-bg);
  281. }
  282. .sidebar::-webkit-scrollbar-thumb {
  283. background: var(--scrollbar);
  284. }
  285. .sidebar-visible .page-wrapper {
  286. transform: translateX(var(--sidebar-width));
  287. }
  288. @media only screen and (min-width: 620px) {
  289. .sidebar-visible .page-wrapper {
  290. transform: none;
  291. margin-left: var(--sidebar-width);
  292. }
  293. }
  294. .chapter {
  295. list-style: none outside none;
  296. padding-left: 0;
  297. line-height: 2.2em;
  298. }
  299. .chapter li {
  300. color: var(--sidebar-non-existant);
  301. }
  302. .chapter li a {
  303. color: var(--sidebar-fg);
  304. display: block;
  305. padding: 0;
  306. text-decoration: none;
  307. }
  308. .chapter li a:hover { text-decoration: none }
  309. .chapter li .active,
  310. a:hover {
  311. /* Animate color change */
  312. color: var(--sidebar-active);
  313. }
  314. .spacer {
  315. width: 100%;
  316. height: 3px;
  317. margin: 5px 0px;
  318. }
  319. .chapter .spacer {
  320. background-color: var(--sidebar-spacer);
  321. }
  322. @media (-moz-touch-enabled: 1), (pointer: coarse) {
  323. .chapter li a { padding: 5px 0; }
  324. .spacer { margin: 10px 0; }
  325. }
  326. .section {
  327. list-style: none outside none;
  328. padding-left: 20px;
  329. line-height: 1.9em;
  330. }
  331. /* Theme Menu Popup */
  332. .theme-popup {
  333. position: absolute;
  334. left: 10px;
  335. top: 50px;
  336. z-index: 1000;
  337. border-radius: 4px;
  338. font-size: 0.7em;
  339. color: var(--fg);
  340. background: var(--theme-popup-bg);
  341. border: 1px solid var(--theme-popup-border);
  342. margin: 0;
  343. padding: 0;
  344. list-style: none;
  345. display: none;
  346. }
  347. .theme-popup .default {
  348. color: var(--icons);
  349. }
  350. .theme-popup .theme {
  351. width: 100%;
  352. border: 0;
  353. margin: 0;
  354. padding: 2px 10px;
  355. line-height: 25px;
  356. white-space: nowrap;
  357. text-align: left;
  358. cursor: pointer;
  359. color: inherit;
  360. background: inherit;
  361. font-size: inherit;
  362. }
  363. .theme-popup .theme:hover {
  364. background-color: var(--theme-hover);
  365. }
  366. .theme-popup .theme:hover:first-child,
  367. .theme-popup .theme:hover:last-child {
  368. border-top-left-radius: inherit;
  369. border-top-right-radius: inherit;
  370. }