_content.scss 7.4 KB

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