_content.scss 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  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. 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: $headerHeight;
  29. }
  30. ._overlay-scrollbars & { padding-left: .625rem; }
  31. @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { margin-left: 0; }
  32. @supports (-ms-overflow-style: none) { margin-left: 0; }
  33. body:not(._native-scrollbars) & {
  34. -webkit-padding-start: .625rem;
  35. -webkit-padding-end: .75rem;
  36. }
  37. }
  38. %loading {
  39. content: 'Loading\2026';
  40. position: absolute;
  41. top: 50%;
  42. left: 0;
  43. right: 0;
  44. line-height: 1;
  45. margin-top: -.6em;
  46. font-size: 4rem;
  47. font-weight: 300;
  48. letter-spacing: -.125rem;
  49. color: $loadingText;
  50. text-align: center;
  51. cursor: default;
  52. }
  53. ._content-loading:before {
  54. @extend %loading;
  55. }
  56. //
  57. // Splash screen
  58. //
  59. ._splash-title {
  60. color: $splashText;
  61. @extend %loading, %user-select-none;
  62. }
  63. //
  64. // Intro
  65. //
  66. ._intro {
  67. display: -ms-flexbox;
  68. display: flex;
  69. -ms-flex-direction: column;
  70. flex-direction: column;
  71. -ms-flex-pack: center;
  72. justify-content: center;
  73. -ms-flex-align: center;
  74. align-items: center;
  75. min-height: calc(100vh - 2.375rem);
  76. ._sidebar-hidden & {
  77. min-height: calc(100vh - 2.375rem - #{$headerHeight});
  78. }
  79. }
  80. ._intro-message {
  81. max-width: 37rem;
  82. margin: .5rem 0;
  83. padding: 1rem 1.25rem;
  84. @extend %note, %note-green;
  85. }
  86. ._intro-hide {
  87. float: right;
  88. line-height: 1.5rem;
  89. cursor: pointer;
  90. }
  91. ._intro-title {
  92. margin: 0 0 1rem;
  93. font-size: 1rem;
  94. line-height: 1.5rem;
  95. }
  96. ._intro-list {
  97. margin: 1rem 0;
  98. padding-left: 2.25rem;
  99. }
  100. ._intro-link { cursor: pointer; }
  101. //
  102. // Error
  103. //
  104. ._error {
  105. position: absolute;
  106. top: 50%;
  107. left: 0;
  108. right: 0;
  109. padding: 0 2rem;
  110. line-height: 1.5rem;
  111. text-align: center;
  112. }
  113. ._error-title {
  114. margin: -5.5rem 0 1rem;
  115. line-height: 2rem;
  116. font-size: 1.5rem;
  117. }
  118. ._error-text {
  119. margin: 0 0 1rem;
  120. color: $textColorLight;
  121. }
  122. ._error-links {
  123. font-size: 1rem;
  124. font-weight: $boldFontWeight;
  125. }
  126. ._error-link { padding: 0 .5rem; }
  127. //
  128. // Heading
  129. //
  130. ._lined-heading,
  131. %lined-heading {
  132. display: flex;
  133. align-items: center;
  134. > * { margin: 0 .3125rem; }
  135. &:after {
  136. content: '';
  137. flex-grow: 1;
  138. height: 1px;
  139. margin-top: .25rem;
  140. margin-left: 1rem;
  141. background: $boxBorderLight;
  142. }
  143. }
  144. ._block-heading { @extend %block-heading; }
  145. ._heading-links {
  146. float: right;
  147. font-weight: normal;
  148. > a + a { margin-left: .25rem; }
  149. }
  150. //
  151. // Table of contents
  152. //
  153. ._toc {
  154. float: right;
  155. max-width: 15em;
  156. margin: .25rem 0 1.5rem 1.5rem;
  157. padding: .625rem 1rem;
  158. @extend %box;
  159. + h1, + ._lined-heading { margin-top: 0; }
  160. }
  161. ._toc-title {
  162. margin: 0 0 .5rem;
  163. font-size: inherit;
  164. font-weight: $boldFontWeight;
  165. }
  166. ._toc-list {
  167. margin: 0;
  168. padding: 0 1em 0 0;
  169. list-style: none;
  170. }
  171. ._toc-link { @extend %internal-link; }
  172. //
  173. // Static page
  174. //
  175. ._static {
  176. padding-bottom: 2em;
  177. > ._lined-heading:first-child { margin-top: 0; }
  178. }
  179. //
  180. // Credits table
  181. //
  182. ._credits {
  183. width: 100%;
  184. }
  185. //
  186. // Doc table
  187. //
  188. ._docs {
  189. width: 100%;
  190. margin-top: .25rem;
  191. line-height: 1.5rem;
  192. th, td {
  193. width: 1%;
  194. &:first-child { width: auto; }
  195. &:last-child { width: 12rem; }
  196. }
  197. }
  198. ._docs-name:before {
  199. float: left;
  200. margin: .25rem .5rem .25rem 0;
  201. @extend %doc-icon;
  202. }
  203. ._docs-size {
  204. text-align: right;
  205. > small { color: $textColorLight; }
  206. }
  207. ._docs-tools {
  208. display: -ms-flexbox;
  209. display: flex;
  210. -ms-flex-wrap: wrap;
  211. flex-wrap: wrap;
  212. -ms-flex-pack: justify;
  213. justify-content: space-between;
  214. -ms-flex-align: center;
  215. align-items: center;
  216. line-height: 1.5rem;
  217. margin-top: -.5rem;
  218. input[type=checkbox] {
  219. vertical-align: top;
  220. margin: .25rem;
  221. }
  222. }
  223. ._docs-links {
  224. -ms-flex: 0 0 auto;
  225. flex: 0 0 auto;
  226. margin: .5rem 0;
  227. padding: .25rem 0;
  228. @extend %box;
  229. ._btn-link {
  230. vertical-align: top;
  231. padding: 0 .75rem;
  232. }
  233. ._btn-link:not(._show) { display: none; }
  234. ._btn-link._show ~ ._btn-link._show { border-left: 1px solid $boxBorder; }
  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. // Search aliases
  293. //
  294. ._aliases {
  295. display: flex;
  296. justify-content: space-between;
  297. > table {
  298. margin-top: 0;
  299. width: calc(50% - 0.5rem);
  300. }
  301. }
  302. //
  303. // Utilities
  304. //
  305. ._bold { font-weight: $boldFontWeight; }
  306. ._note { @extend %note; }
  307. ._note-green { @extend %note-green; }
  308. ._label { @extend %label; }
  309. ._code { @extend %code; }
  310. ._highlight { background: $highlightBackground !important; }
  311. ._table { width: 100%; }
  312. ._mobile ._table { overflow-x: auto; }
  313. ._pre-heading { @extend %pre-heading; }
  314. ._pre-clip {
  315. display: none;
  316. position: absolute;
  317. top: 0;
  318. right: 0;
  319. opacity: .5;
  320. padding: .375rem;
  321. cursor: pointer;
  322. pre:hover > & { display: block; }
  323. &:hover { opacity: 1; }
  324. > svg { @extend %svg-icon; }
  325. @if $style == 'dark' {
  326. > svg { fill: white; }
  327. } @else {
  328. > svg { fill: black; }
  329. }
  330. &._pre-clip-success > svg,
  331. &._pre-clip-error > svg {
  332. display: none;
  333. }
  334. &._pre-clip-success:before { content: 'Copied'; }
  335. &._pre-clip-error:before { content: 'Error'; }
  336. }
  337. ._btn {
  338. display: inline-block;
  339. vertical-align: top;
  340. line-height: normal;
  341. white-space: nowrap;
  342. padding: .375rem .675rem;
  343. background-image: linear-gradient(lighten($boxBackground, 4%), darken($boxBackground, 2%));
  344. border: 1px solid $boxBorder;
  345. border-radius: 3px;
  346. box-shadow: 0 1px rgba($boxBorder, .08);
  347. cursor: pointer;
  348. &:active {
  349. background-color: $boxBackground;
  350. box-shadow: inset 0 1px 1px rgba(black, .05), inset 0 1px 4px $boxBorder;
  351. }
  352. }
  353. ._file-btn {
  354. position: relative;
  355. overflow: hidden;
  356. > input {
  357. position: absolute;
  358. top: 0;
  359. left: 0;
  360. width: 100%;
  361. height: 100%;
  362. visibility: hidden;
  363. }
  364. }
  365. ._btn-link {
  366. line-height: inherit;
  367. color: $linkColor;
  368. text-decoration: $linkTextDecoration;
  369. &:hover {
  370. color: $linkColorHover;
  371. text-decoration: underline;
  372. }
  373. }
  374. ._reset-btn,
  375. ._reset-btn:hover {
  376. color: $textColorRed;
  377. }
  378. ._github-btn {
  379. display: inline-block;
  380. vertical-align: text-top;
  381. margin-left: .25rem;
  382. }