style.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. @import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700|Roboto+Mono:400');
  2. @import 'fontawesome.scss';
  3. $white: #fff ; // color5
  4. $lightest: #d9e1e8; // color2
  5. $lighter: #9baec8; // color3
  6. $darkest: #1F232B; // color1
  7. $black: #000 ; // color8
  8. $darker: lighten($darkest, 34%);
  9. $vibrant: #2b90d9; // color4
  10. $error: #df405a; // color6
  11. $success: #79bd9a; // color7
  12. $transition-in: 100ms linear;
  13. $transition-out: 250ms linear;
  14. $content-width: 1080px;
  15. $mobile-width: 600px;
  16. /* http://meyerweb.com/eric/tools/css/reset/
  17. v2.0 | 20110126
  18. License: none (public domain)
  19. */
  20. html, body, div, span, applet, object, iframe,
  21. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  22. a, abbr, acronym, address, big, cite, code,
  23. del, dfn, em, img, ins, kbd, q, s, samp,
  24. small, strike, strong, sub, sup, tt, var,
  25. b, u, i, center,
  26. dl, dt, dd, ol, ul, li,
  27. fieldset, form, label, legend,
  28. table, caption, tbody, tfoot, thead, tr, th, td,
  29. article, aside, canvas, details, embed,
  30. figure, figcaption, footer, header, hgroup,
  31. menu, nav, output, ruby, section, summary,
  32. time, mark, audio, video {
  33. margin: 0;
  34. padding: 0;
  35. border: 0;
  36. font: inherit;
  37. vertical-align: baseline;
  38. }
  39. /* HTML5 display-role reset for older browsers */
  40. article, aside, details, figcaption, figure,
  41. footer, header, hgroup, menu, nav, section {
  42. display: block;
  43. }
  44. body {
  45. line-height: 1;
  46. box-sizing: border-box;
  47. text-rendering: optimizelegibility;
  48. font-feature-settings: "kern";
  49. text-size-adjust: none;
  50. }
  51. ol, ul {
  52. list-style: none;
  53. }
  54. blockquote, q {
  55. quotes: none;
  56. }
  57. blockquote:before, blockquote:after,
  58. q:before, q:after {
  59. content: '';
  60. content: none;
  61. }
  62. table {
  63. border-collapse: collapse;
  64. border-spacing: 0;
  65. }
  66. a {
  67. outline: 0;
  68. }
  69. body {
  70. box-sizing: border-box;
  71. font-family: 'Roboto', sans-serif;
  72. text-rendering: optimizeLegibility;
  73. background-color: $darkest;
  74. color: $lighter;
  75. font-size: 13px;
  76. line-height: 18px;
  77. font-weight: 400;
  78. padding-top: 30px;
  79. }
  80. .container {
  81. box-sizing: border-box;
  82. max-width: $content-width;
  83. margin: 0 auto;
  84. padding: 0 20px;
  85. }
  86. .sidebar-layout {
  87. display: grid;
  88. grid-gap: 15px;
  89. grid-template-columns: 260px minmax(300px, ($content-width - 260px));
  90. grid-template-rows: auto;
  91. margin-bottom: 30px;
  92. @media screen and (max-width: $mobile-width) {
  93. display: block;
  94. }
  95. }
  96. .sidebar {
  97. @media screen and (max-width: $mobile-width) {
  98. margin-bottom: 60px;
  99. }
  100. .brand {
  101. display: flex;
  102. justify-content: flex-start;
  103. align-items: center;
  104. color: $darkest;
  105. margin-top: 12px;
  106. margin-bottom: 52px;
  107. img {
  108. height: 38px;
  109. }
  110. @media screen and (max-width: $mobile-width) {
  111. justify-content: center;
  112. img {
  113. position: static;
  114. }
  115. }
  116. }
  117. & > ul > li {
  118. margin-bottom: 26px;
  119. &:last-child {
  120. margin-bottom: 0;
  121. }
  122. }
  123. .sub-title {
  124. display: block;
  125. padding: 10px;
  126. font-weight: 500;
  127. text-transform: uppercase;
  128. }
  129. & > ul a {
  130. display: block;
  131. color: $white;
  132. text-decoration: none;
  133. font-weight: 500;
  134. padding: 10px;
  135. }
  136. .sub-menu {
  137. a.active {
  138. color: $vibrant;
  139. }
  140. &.collapsed {
  141. display: none;
  142. }
  143. .sub-menu {
  144. padding-left: 15px;
  145. }
  146. }
  147. }
  148. .footer {
  149. padding-bottom: 30px;
  150. .legal {
  151. margin-top: 30px;
  152. &--right {
  153. float: right;
  154. text-align: right;
  155. @media screen and (max-width: $mobile-width) {
  156. float: none;
  157. text-align: left;
  158. }
  159. }
  160. a {
  161. color: $darker;
  162. text-decoration: none;
  163. }
  164. }
  165. }
  166. main {
  167. h1 {
  168. font-size: 36px;
  169. line-height: 1.48;
  170. font-weight: 600;
  171. color: $lightest;
  172. padding-bottom: 35px;
  173. border-bottom: 1px solid lighten($darkest, 8%);
  174. margin-bottom: 35px;
  175. margin-left: -2.63px;
  176. text-align: left;
  177. position: relative;
  178. }
  179. h2 {
  180. font-size: 26px;
  181. margin-left: -1.63px;
  182. line-height: 1.22;
  183. text-align: left;
  184. margin-top: 50px;
  185. margin-bottom: 30px;
  186. font-weight: 600;
  187. color: $lightest;
  188. }
  189. h3 {
  190. font-size: 21px;
  191. line-height: 1.22;
  192. font-weight: 500;
  193. color: $lightest;
  194. margin-top: 25px;
  195. margin-bottom: 30px;
  196. margin-left: -1.75px;
  197. text-align: left;
  198. }
  199. h4 {
  200. font-size: 18px;
  201. line-height: 1.22;
  202. font-weight: 500;
  203. color: $lightest;
  204. margin-top: 25px;
  205. margin-bottom: 30px;
  206. margin-left: -1.75px;
  207. text-align: left;
  208. }
  209. h5 {
  210. font-size: 18px;
  211. line-height: 1.22;
  212. font-weight: 500;
  213. color: $lightest;
  214. margin-top: 25px;
  215. margin-bottom: 30px;
  216. margin-left: -1.75px;
  217. text-align: left;
  218. }
  219. h6 {
  220. font-weight: 700;
  221. margin-top: 25px;
  222. margin-left: -1.75px;
  223. text-align: left;
  224. color: $lightest;
  225. font-size: 16px;
  226. line-height: 28px;
  227. margin-bottom: 26px;
  228. }
  229. blockquote {
  230. color: $lightest;
  231. font-size: 16px;
  232. line-height: 28px;
  233. font-style: italic;
  234. border-left: 3px solid $vibrant;
  235. padding-left: 20px;
  236. margin-left: -23px;
  237. padding-bottom: 2px;
  238. margin-bottom: 26px;
  239. p:last-child {
  240. margin-bottom: 0;
  241. }
  242. }
  243. p {
  244. color: $lightest;
  245. font-size: 16px;
  246. line-height: 28px;
  247. font-weight: normal;
  248. margin-bottom: 26px;
  249. hyphens: auto;
  250. }
  251. a {
  252. color: lighten($vibrant, 18%);
  253. }
  254. img {
  255. display: block;
  256. margin: 0 auto;
  257. max-width: 100%;
  258. height: auto;
  259. border-radius: 4px;
  260. box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
  261. }
  262. .image-large {
  263. margin-bottom: 50px;
  264. }
  265. .image-pull-left {
  266. float: left;
  267. }
  268. em {
  269. font-style: italic;
  270. }
  271. strong {
  272. font-weight: 600;
  273. color: #fff;
  274. }
  275. ul,
  276. ol {
  277. counter-reset: post;
  278. margin-bottom: 26px;
  279. }
  280. ul li,
  281. ol li {
  282. margin-left: 30px;
  283. margin-bottom: 14px;
  284. color: $lightest;
  285. font-size: 16px;
  286. line-height: 28px;
  287. &::before {
  288. position: absolute;
  289. display: inline-block;
  290. -webkit-box-sizing: border-box;
  291. box-sizing: border-box;
  292. width: 78px;
  293. margin-left: -78px;
  294. text-align: right;
  295. padding-top: 4px;
  296. padding-right: 15px;
  297. content: '\2022';
  298. }
  299. }
  300. ol > li {
  301. &::before {
  302. padding-top: 0;
  303. content: counter(post) ". ";
  304. counter-increment: post;
  305. }
  306. }
  307. li > ul,
  308. li > ol {
  309. margin-top: 14px;
  310. }
  311. table {
  312. width: 100%;
  313. margin-bottom: 26px;
  314. color: $lightest;
  315. tr:nth-child(2n),
  316. thead tr {
  317. background-color: darken($darkest, 4%);
  318. }
  319. th,
  320. td {
  321. font-size: 16px;
  322. line-height: 28px;
  323. padding: 10px 15px;
  324. vertical-align: middle;
  325. border: 1px solid lighten($darkest, 8%);
  326. .fa-check {
  327. color: $success;
  328. }
  329. .fa-times {
  330. color: $error;
  331. }
  332. }
  333. thead th {
  334. font-weight: 500;
  335. }
  336. }
  337. figure {
  338. figcaption {
  339. margin-top: 8px;
  340. text-align: center;
  341. &,
  342. p {
  343. color: $darker;
  344. }
  345. }
  346. }
  347. hr {
  348. background: transparent;
  349. border: 0;
  350. border-top: 1px solid $darker;
  351. margin: 26px 0;
  352. }
  353. pre {
  354. margin-bottom: 26px;
  355. font-size: 16px;
  356. line-height: 28px;
  357. background-color: lighten($darkest, 8%);
  358. border-radius: 4px;
  359. padding: 16px;
  360. overflow: auto;
  361. }
  362. figure pre {
  363. margin-bottom: 0;
  364. }
  365. code {
  366. padding: 0.2em 0.4em;
  367. margin: 0;
  368. font-size: 85%;
  369. font-family: 'Roboto Mono', monospace;
  370. background-color: lighten($darkest, 8%);
  371. border-radius: 3px;
  372. hyphens: none;
  373. white-space: pre;
  374. }
  375. pre code {
  376. background: transparent;
  377. padding: 0;
  378. }
  379. .mastodon-embed,
  380. iframe {
  381. width: 100%;
  382. display: block;
  383. margin: 0 auto;
  384. margin-bottom: 26px;
  385. border-radius: 4px;
  386. box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
  387. }
  388. }
  389. .mascot {
  390. display: flex;
  391. justify-content: flex-start;
  392. align-items: center;
  393. margin-bottom: 60px;
  394. @media screen and (max-width: $mobile-width) {
  395. display: none;
  396. }
  397. }
  398. #TableOfContents {
  399. color: $lighter;
  400. ul li {
  401. color: inherit;
  402. }
  403. & > ul > li {
  404. margin-left: 0;
  405. &::before {
  406. display: none;
  407. }
  408. }
  409. a {
  410. text-decoration: none;
  411. color: inherit;
  412. }
  413. padding-bottom: 35px - 14px;
  414. border-bottom: 1px solid lighten($darkest, 8%);
  415. margin-bottom: 35px;
  416. }
  417. .cta-banner {
  418. background: $vibrant;
  419. border-radius: 4px;
  420. text-align: center;
  421. padding: 40px;
  422. h4 {
  423. font-size: 24px;
  424. line-height: 1.08;
  425. font-weight: 600;
  426. margin-bottom: 20px;
  427. color: #fff;
  428. }
  429. p {
  430. color: #fff;
  431. font-size: 18px;
  432. line-height: 1.22;
  433. margin-bottom: 20px;
  434. }
  435. & > a {
  436. font-weight: 500;
  437. color: $vibrant;
  438. background: #fff;
  439. border-radius: 4px;
  440. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  441. font-family: inherit;
  442. display: inline-block;
  443. text-align: center;
  444. font-size: 16px;
  445. text-decoration: none;
  446. line-height: 36px;
  447. padding: 4px 16px;
  448. margin: 0 auto;
  449. border: 0;
  450. cursor: pointer;
  451. &.secondary {
  452. padding: 2px 14px;
  453. border: 2px solid #fff;
  454. background: transparent;
  455. margin-left: 4px;
  456. color: #fff;
  457. }
  458. @media screen and (max-width: 375px) {
  459. margin-bottom: 10px;
  460. }
  461. }
  462. }
  463. .hint {
  464. margin: 26px 0;
  465. padding: 16px 16px 16px 56px;
  466. position: relative;
  467. border-left: 4px solid;
  468. border-radius: 4px;
  469. background-color: lighten($darkest, 8%);
  470. color: $white;
  471. font-size: 16px;
  472. line-height: 28px;
  473. &-info {
  474. border-color: $vibrant;
  475. .hint-icon {
  476. color: $vibrant;
  477. }
  478. }
  479. &-warning {
  480. border-color: #ca8f04;
  481. .hint-icon {
  482. color: #ca8f04;
  483. }
  484. }
  485. &-success {
  486. border-color: $success;
  487. .hint-icon {
  488. color: $success;
  489. }
  490. }
  491. &-danger {
  492. border-color: $error;
  493. .hint-icon {
  494. color: $error;
  495. }
  496. }
  497. &-icon {
  498. position: absolute;
  499. top: 18px;
  500. left: 16px;
  501. font-size: 24px;
  502. }
  503. }
  504. .page-ref {
  505. display: block;
  506. background: lighten($darkest, 4%);
  507. color: $vibrant;
  508. text-decoration: none;
  509. font-weight: 500;
  510. font-size: 18px;
  511. position: relative;
  512. margin: 26px 0;
  513. padding: 24px 24px 24px 50px;
  514. border-radius: 4px;
  515. &-icon {
  516. position: absolute;
  517. top: 20px;
  518. left: 16px;
  519. font-size: 24px;
  520. }
  521. &:hover,
  522. &:focus,
  523. &:active {
  524. background: lighten($darkest, 8%);
  525. }
  526. }
  527. .api-method {
  528. display: flex;
  529. align-items: center;
  530. font-weight: 500;
  531. font-size: 18px;
  532. &-method {
  533. display: inline-flex;
  534. align-items: center;
  535. padding: 2px 0;
  536. border-radius: 9999px;
  537. height: 21px;
  538. color: $white;
  539. background: $vibrant;
  540. margin: 0;
  541. margin-right: 8px;
  542. span {
  543. display: inline-block;
  544. padding: 0 8px;
  545. font-size: 12px;
  546. font-weight: 700;
  547. text-transform: uppercase;
  548. letter-spacing: 1px;
  549. line-height: 15px;
  550. }
  551. }
  552. &-url {
  553. background: lighten($darkest, 4%);
  554. border-radius: 4px;
  555. padding: 8px;
  556. font-size: 16px;
  557. margin: 26px 0;
  558. line-height: 1.7;
  559. }
  560. &-host {
  561. color: $darker;
  562. }
  563. &-path {
  564. font-weight: 700;
  565. color: $white;
  566. }
  567. }
  568. .api-method-parameters-list {
  569. border: 1px solid lighten($darkest, 8%);
  570. border-radius: 4px;
  571. margin-bottom: 26px;
  572. }
  573. .api-method-parameters-type {
  574. font-weight: 400;
  575. color: $darker;
  576. }
  577. .api-method-parameters-type,
  578. .api-method-response-example h5 {
  579. font-size: 16px;
  580. margin-bottom: 16px;
  581. }
  582. .api-method-parameter {
  583. display: flex;
  584. border-bottom: 1px solid lighten($darkest, 8%);
  585. &:last-child {
  586. border-bottom: 0;
  587. }
  588. &-cell {
  589. box-sizing: border-box;
  590. padding: 16px 10px;
  591. color: $white;
  592. }
  593. &-required {
  594. text-transform: uppercase;
  595. font-size: 12px;
  596. font-weight: 500;
  597. color: $error;
  598. }
  599. &-optional {
  600. text-transform: uppercase;
  601. font-size: 12px;
  602. font-weight: 500;
  603. color: $darker;
  604. }
  605. &-name {
  606. width: 180px;
  607. font-size: 16px;
  608. & > div:first-child {
  609. margin-bottom: 2px;
  610. }
  611. }
  612. &-type {
  613. width: 100px;
  614. }
  615. &-description {
  616. flex: 1 1 0%;
  617. font-size: 15px;
  618. }
  619. }
  620. .api-method-response-example {
  621. &-indicator {
  622. display: inline-block;
  623. width: 12px;
  624. height: 12px;
  625. border-radius: 50%;
  626. background: $success;
  627. &-error {
  628. background: $error;
  629. }
  630. }
  631. }
  632. .sponsorship {
  633. background: darken($darkest, 4%);
  634. border-radius: 4px;
  635. padding: 40px 0;
  636. h2 {
  637. line-height: 21px;
  638. font-weight: 500;
  639. font-size: 16px;
  640. color: lighten($darkest, 40%);
  641. text-align: center;
  642. margin-bottom: 20px;
  643. }
  644. .logo-grid {
  645. display: flex;
  646. align-items: center;
  647. justify-content: center;
  648. flex-direction: row;
  649. & > div {
  650. display: flex;
  651. align-items: center;
  652. justify-content: center;
  653. flex-direction: row;
  654. }
  655. a {
  656. display: inline-block;
  657. text-decoration: none;
  658. padding: 0 10px;
  659. img {
  660. display: block;
  661. margin: 0;
  662. height: 28px;
  663. width: auto;
  664. opacity: 0.8;
  665. transition: all $transition-in;
  666. filter: grayscale(100%);
  667. }
  668. &:hover {
  669. img {
  670. opacity: 0.9;
  671. transition: all $transition-out;
  672. filter: grayscale(0%);
  673. }
  674. }
  675. }
  676. }
  677. h2 {
  678. color: $lightest;
  679. }
  680. .logo-grid > div {
  681. flex-wrap: wrap;
  682. }
  683. .logo-grid a {
  684. padding: 20px;
  685. }
  686. }