style.scss 15 KB

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