_content.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. //
  2. // Content
  3. //
  4. ._container {
  5. position: relative;
  6. z-index: $contentZ;
  7. height: 100%;
  8. margin-left: $sidebarWidth;
  9. pointer-events: none;
  10. @extend %border-box;
  11. @media #{$mediumScreen} { margin-left: $sidebarMediumWidth; }
  12. ._sidebar-hidden & { margin-left: 0; }
  13. }
  14. ._content {
  15. position: relative;
  16. height: 100%;
  17. overflow-y: scroll;
  18. margin-left: .875rem;
  19. padding: 1.125rem 1.5rem 0;
  20. font-size: .875rem;
  21. pointer-events: auto;
  22. -webkit-overflow-scrolling: touch;
  23. @extend %border-box;
  24. -webkit-padding-start: .625rem;
  25. -webkit-padding-end: .75rem;
  26. @media (-moz-overlay-scrollbars) { padding-left: .625rem; }
  27. @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { margin-left: 0; }
  28. ._sidebar-hidden &:before {
  29. content: '';
  30. display: block;
  31. margin-top: $headerHeight;
  32. }
  33. &::-webkit-scrollbar { -webkit-appearance: none; }
  34. &::-webkit-scrollbar:vertical { width: 14px; }
  35. &::-webkit-scrollbar:horizontal { height: 14px }
  36. &::-webkit-scrollbar-button { display: none; }
  37. &::-webkit-scrollbar-track,
  38. &::-webkit-scrollbar-corner { background: $contentBackground; }
  39. &::-webkit-scrollbar-thumb {
  40. min-height: 2rem;
  41. background: $scrollbarColor;
  42. background-clip: padding-box;
  43. border: 5px solid $contentBackground;
  44. border-radius: 10px;
  45. &:hover,
  46. &:active {
  47. background-color: $scrollbarColorHover;
  48. border-width: 4px;
  49. }
  50. }
  51. }
  52. ._content-loading:before {
  53. opacity: 1;
  54. @extend ._booting:before;
  55. }
  56. //
  57. // Splash screen
  58. //
  59. ._splash-title {
  60. color: $splashText;
  61. cursor: default;
  62. opacity: 1;
  63. @extend ._booting:before, %user-select-none;
  64. }
  65. //
  66. // Intro
  67. //
  68. ._intro {
  69. display: flex;
  70. flex-direction: column;
  71. justify-content: center;
  72. align-items: center;
  73. min-height: calc(100vh - 2.375rem);
  74. ._sidebar-hidden & {
  75. min-height: calc(100vh - 2.375rem - #{$headerHeight});
  76. }
  77. }
  78. ._intro-message {
  79. max-width: 37rem;
  80. margin: .5rem 0;
  81. padding: 1rem 1.25rem;
  82. @extend %note, %note-green;
  83. }
  84. ._intro-hide {
  85. float: right;
  86. line-height: 1.5rem;
  87. cursor: pointer;
  88. }
  89. ._intro-title {
  90. margin: 0 0 1rem;
  91. font-size: 1rem;
  92. line-height: 1.5rem;
  93. }
  94. ._intro-list {
  95. margin: 1rem 0;
  96. padding-left: 2.25rem;
  97. }
  98. ._intro-link { cursor: pointer; }
  99. //
  100. // Error
  101. //
  102. ._error {
  103. position: absolute;
  104. top: 50%;
  105. left: 0;
  106. right: 0;
  107. padding: 0 2rem;
  108. line-height: 1.5rem;
  109. text-align: center;
  110. }
  111. ._error-title {
  112. margin: -5.5rem 0 1rem;
  113. line-height: 2rem;
  114. font-size: 1.5rem;
  115. }
  116. ._error-text {
  117. margin: 0 0 1rem;
  118. color: $textColorLight;
  119. }
  120. ._error-links {
  121. font-size: 1rem;
  122. font-weight: $boldFontWeight;
  123. }
  124. ._error-link { padding: 0 .5rem; }
  125. //
  126. // Heading
  127. //
  128. ._lined-heading,
  129. %lined-heading {
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. &:after {
  134. content: '';
  135. display: inline-block;
  136. vertical-align: middle;
  137. flex-grow: 1;
  138. height: 1px;
  139. line-height: 0;
  140. margin-top: .25rem;
  141. margin-left: 1rem;
  142. background: $boxBorderLight;
  143. }
  144. }
  145. ._block-heading { @extend %block-heading; }
  146. ._heading-links {
  147. float: right;
  148. font-weight: normal;
  149. > a + a { margin-left: .25rem; }
  150. }
  151. //
  152. // Table of contents
  153. //
  154. ._toc {
  155. float: right;
  156. max-width: 15em;
  157. margin: .25rem 0 1.5rem 1.5rem;
  158. padding: .625rem 1rem;
  159. @extend %box;
  160. + h1, + ._lined-heading { margin-top: 0; }
  161. }
  162. ._toc-title {
  163. margin: 0 0 .5rem;
  164. font-size: inherit;
  165. font-weight: $boldFontWeight;
  166. }
  167. ._toc-list {
  168. margin: 0;
  169. padding: 0 1em 0 0;
  170. list-style: none;
  171. }
  172. ._toc-link { @extend %internal-link; }
  173. //
  174. // Static page
  175. //
  176. ._static {
  177. padding-bottom: 2em;
  178. > ._lined-heading:first-child { margin-top: 0; }
  179. }
  180. //
  181. // Credits table
  182. //
  183. ._credits {
  184. width: 100%;
  185. }
  186. //
  187. // Doc table
  188. //
  189. ._docs {
  190. width: 100%;
  191. margin-top: .75rem;
  192. line-height: 1.5rem;
  193. th, td {
  194. width: 1%;
  195. &:first-child { width: auto; }
  196. &:last-child { width: 12rem; }
  197. }
  198. td > a { cursor: pointer; }
  199. }
  200. ._docs-name:before {
  201. float: left;
  202. margin: .25rem .5rem .25rem 0;
  203. @extend %doc-icon;
  204. }
  205. ._docs-size {
  206. text-align: right;
  207. > small { color: $textColorLight; }
  208. }
  209. ._docs-tools {
  210. overflow: hidden;
  211. line-height: 1.5rem;
  212. }
  213. ._docs-links {
  214. float: right;
  215. padding: .375rem .125rem;
  216. @extend %box;
  217. }
  218. ._docs-link {
  219. display: none;
  220. vertical-align: top;
  221. padding: 0 .75rem;
  222. cursor: pointer;
  223. &._show { display: inline-block; }
  224. &._show ~ &._show { border-left: 1px solid $boxBorder; }
  225. }
  226. ._docs-label {
  227. overflow: hidden;
  228. margin: 1px 0;
  229. padding: .375rem .5rem;
  230. > input {
  231. display: inline-block;
  232. vertical-align: top;
  233. margin: .25rem;
  234. }
  235. }
  236. //
  237. // News
  238. //
  239. ._content {
  240. ._news-row {
  241. position: relative;
  242. padding-left: 10em;
  243. font-size: .8125rem;
  244. color: $textColorLight;
  245. + ._news-row { margin-top: 1em; }
  246. }
  247. ._news-title {
  248. display: block;
  249. font-size: .875rem;
  250. color: $textColor;
  251. }
  252. ._news-date {
  253. position: absolute;
  254. top: 0;
  255. left: 0;
  256. font-size: .875rem;
  257. }
  258. }
  259. //
  260. // Keyboard shortcuts
  261. //
  262. ._shortcuts-title {
  263. width: 16rem;
  264. max-width: 40%;
  265. margin: 2rem 0 1rem;
  266. font-size: 1rem;
  267. text-align: right;
  268. }
  269. ._shortcuts-dl { margin: 1rem 0; }
  270. ._shortcuts-dt {
  271. float: left;
  272. clear: left;
  273. margin: 0 0 .75rem;
  274. width: 16rem;
  275. max-width: 40%;
  276. font-weight: normal;
  277. text-align: right;
  278. }
  279. ._shortcuts-dd {
  280. display: block;
  281. margin: 0 0 .75rem;
  282. padding: 1px 0 1px .75rem;
  283. overflow: hidden;
  284. }
  285. ._shortcut-code {
  286. display: inline-block;
  287. vertical-align: top;
  288. padding: 0 .5em;
  289. @extend %label;
  290. }
  291. //
  292. // Abbreviations
  293. //
  294. ._abbreviations td { @extend %code; }
  295. //
  296. // Utilities
  297. //
  298. ._note { @extend %note; }
  299. ._note-green { @extend %note-green; }
  300. ._label { @extend %label; }
  301. ._highlight { background: $highlightBackground !important; }
  302. ._pre-clip {
  303. display: none;
  304. position: absolute;
  305. top: 0;
  306. right: 0;
  307. opacity: .5;
  308. padding: .375rem;
  309. cursor: pointer;
  310. pre:hover > & { display: block; }
  311. &:hover { opacity: 1; }
  312. @if $style == 'dark' {
  313. &:before { @extend %icon, %icon-clipboard-white; }
  314. } @else {
  315. &:before { @extend %icon, %icon-clipboard; }
  316. }
  317. &._pre-clip-success, &._pre-clip-error {
  318. &:before { display: none; }
  319. &:after {
  320. content: 'Copied';
  321. padding-right: .25rem;
  322. }
  323. }
  324. &._pre-clip-error:after { content: 'Error'; }
  325. }
  326. ._btn {
  327. white-space: nowrap;
  328. padding: .125rem .375rem;
  329. background-image: linear-gradient(lighten($boxBackground, 3%), darken($boxBackground, 4%));
  330. border: 1px solid $boxBorder;
  331. border-radius: 3px;
  332. &:active {
  333. background-color: $boxBackground;
  334. box-shadow: inset 0 1px 3px rgba(black, .15);
  335. }
  336. }
  337. ._github-btn {
  338. display: inline-block;
  339. vertical-align: text-top;
  340. margin-left: .25rem;
  341. }