style.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930
  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. }
  183. .brand {
  184. display: flex;
  185. justify-content: flex-start;
  186. align-items: center;
  187. color: $darkest;
  188. margin-top: 12px;
  189. margin-bottom: 52px;
  190. img {
  191. height: 38px;
  192. }
  193. @media screen and (max-width: $mobile-width) {
  194. justify-content: center;
  195. img {
  196. position: static;
  197. }
  198. }
  199. }
  200. &>ul>li {
  201. margin-bottom: 26px;
  202. &:last-child {
  203. margin-bottom: 0;
  204. }
  205. }
  206. .sub-title {
  207. display: block;
  208. padding: 10px;
  209. font-weight: 500;
  210. text-transform: uppercase;
  211. }
  212. &>ul a {
  213. display: block;
  214. color: $white;
  215. text-decoration: none;
  216. font-weight: 500;
  217. padding: 10px;
  218. }
  219. .sub-menu {
  220. a.active {
  221. color: $vibrant;
  222. }
  223. &.collapsed {
  224. display: none;
  225. }
  226. .sub-menu {
  227. padding-left: 15px;
  228. }
  229. }
  230. }
  231. .footer {
  232. padding-bottom: 30px;
  233. .legal {
  234. margin-top: 30px;
  235. &--right {
  236. float: right;
  237. text-align: right;
  238. @media screen and (max-width: $mobile-width) {
  239. float: none;
  240. text-align: left;
  241. }
  242. }
  243. a {
  244. color: $darker;
  245. text-decoration: none;
  246. }
  247. }
  248. }
  249. main {
  250. h1 {
  251. font-size: 36px;
  252. line-height: 1.48;
  253. font-weight: 600;
  254. color: $lightest;
  255. padding-bottom: 35px;
  256. border-bottom: 1px solid lighten($darkest, 8%);
  257. margin-bottom: 35px;
  258. margin-left: -2.63px;
  259. text-align: left;
  260. position: relative;
  261. }
  262. h2 {
  263. font-size: 26px;
  264. margin-left: -1.63px;
  265. line-height: 1.22;
  266. text-align: left;
  267. margin-top: 50px;
  268. margin-bottom: 30px;
  269. font-weight: 600;
  270. color: $lightest;
  271. }
  272. h3 {
  273. font-size: 21px;
  274. line-height: 1.22;
  275. font-weight: 500;
  276. color: $lightest;
  277. margin-top: 25px;
  278. margin-bottom: 30px;
  279. margin-left: -1.75px;
  280. text-align: left;
  281. }
  282. h4 {
  283. font-size: 18px;
  284. line-height: 1.22;
  285. font-weight: 500;
  286. color: $lightest;
  287. margin-top: 25px;
  288. margin-bottom: 30px;
  289. margin-left: -1.75px;
  290. text-align: left;
  291. }
  292. h5 {
  293. font-size: 18px;
  294. line-height: 1.22;
  295. font-weight: 500;
  296. color: $lightest;
  297. margin-top: 25px;
  298. margin-bottom: 30px;
  299. margin-left: -1.75px;
  300. text-align: left;
  301. }
  302. h6 {
  303. font-weight: 700;
  304. margin-top: 25px;
  305. margin-left: -1.75px;
  306. text-align: left;
  307. color: $lightest;
  308. font-size: 16px;
  309. line-height: 28px;
  310. margin-bottom: 26px;
  311. }
  312. blockquote {
  313. color: $lightest;
  314. font-size: 16px;
  315. line-height: 28px;
  316. font-style: italic;
  317. border-left: 3px solid $vibrant;
  318. padding-left: 20px;
  319. margin-left: -23px;
  320. padding-bottom: 2px;
  321. margin-bottom: 26px;
  322. p:last-child {
  323. margin-bottom: 0;
  324. }
  325. }
  326. p {
  327. color: $lightest;
  328. font-size: 16px;
  329. line-height: 28px;
  330. font-weight: normal;
  331. margin-bottom: 26px;
  332. -webkit-hyphens: auto;
  333. hyphens: auto;
  334. }
  335. a {
  336. color: lighten($vibrant, 18%);
  337. }
  338. img {
  339. display: block;
  340. margin: 0 auto;
  341. max-width: 100%;
  342. height: auto;
  343. border-radius: 4px;
  344. box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
  345. }
  346. .image-large {
  347. margin-bottom: 50px;
  348. }
  349. .image-pull-left {
  350. float: left;
  351. }
  352. em {
  353. font-style: italic;
  354. }
  355. strong {
  356. font-weight: 600;
  357. color: #fff;
  358. }
  359. ul,
  360. ol {
  361. counter-reset: post;
  362. margin-bottom: 26px;
  363. }
  364. ul li,
  365. ol li {
  366. margin-left: 30px;
  367. margin-bottom: 14px;
  368. color: $lightest;
  369. font-size: 16px;
  370. line-height: 28px;
  371. &::before {
  372. position: absolute;
  373. display: inline-block;
  374. -webkit-box-sizing: border-box;
  375. box-sizing: border-box;
  376. width: 78px;
  377. margin-left: -78px;
  378. text-align: right;
  379. padding-right: 15px;
  380. content: '\2022';
  381. }
  382. }
  383. ol>li {
  384. &::before {
  385. padding-top: 0;
  386. content: counter(post) ". ";
  387. counter-increment: post;
  388. }
  389. }
  390. li>ul,
  391. li>ol {
  392. margin-top: 14px;
  393. }
  394. table {
  395. width: 100%;
  396. margin-bottom: 26px;
  397. color: $lightest;
  398. tr:nth-child(2n),
  399. thead tr {
  400. background-color: darken($darkest, 4%);
  401. }
  402. th,
  403. td {
  404. font-size: 16px;
  405. line-height: 28px;
  406. padding: 10px 15px;
  407. vertical-align: middle;
  408. border: 1px solid lighten($darkest, 8%);
  409. .fa-check {
  410. color: $success;
  411. }
  412. .fa-times {
  413. color: $error;
  414. }
  415. }
  416. thead th {
  417. font-weight: 500;
  418. }
  419. }
  420. figure {
  421. figcaption {
  422. margin-top: 8px;
  423. text-align: center;
  424. &,
  425. p {
  426. color: $darker;
  427. }
  428. }
  429. }
  430. hr {
  431. background: transparent;
  432. border: 0;
  433. border-top: 1px solid $darker;
  434. margin: 26px 0;
  435. }
  436. pre {
  437. margin-bottom: 26px;
  438. font-size: 16px;
  439. line-height: 28px;
  440. background-color: lighten($darkest, 8%);
  441. border-radius: 4px;
  442. padding: 16px;
  443. overflow: auto;
  444. }
  445. figure pre {
  446. margin-bottom: 0;
  447. }
  448. code {
  449. padding: 0.2em 0.4em;
  450. margin: 0;
  451. font-size: 85%;
  452. font-family: 'Roboto Mono', monospace;
  453. background-color: lighten($darkest, 8%);
  454. border-radius: 3px;
  455. -webkit-hyphens: none;
  456. hyphens: none;
  457. white-space: pre;
  458. }
  459. pre code {
  460. background: transparent;
  461. padding: 0;
  462. }
  463. dl {
  464. color: $lightest;
  465. font-size: 16px;
  466. line-height: 28px;
  467. font-weight: normal;
  468. margin-bottom: 26px;
  469. -webkit-hyphens: auto;
  470. hyphens: auto;
  471. dt {
  472. font-weight: 700;
  473. background: lighten($darkest, 8%);
  474. padding: 2px 16px;
  475. max-width: max-content;
  476. margin-bottom: 4px;
  477. }
  478. dd {
  479. margin-left: 16px;
  480. margin-bottom: 16px;
  481. }
  482. }
  483. .mastodon-embed,
  484. iframe {
  485. width: 100%;
  486. display: block;
  487. margin: 0 auto;
  488. margin-bottom: 26px;
  489. border-radius: 4px;
  490. box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
  491. }
  492. }
  493. .mascot {
  494. display: flex;
  495. justify-content: flex-start;
  496. align-items: center;
  497. margin-bottom: 60px;
  498. @media screen and (max-width: $mobile-width) {
  499. display: none;
  500. }
  501. }
  502. #TableOfContents {
  503. color: $lighter;
  504. ul li {
  505. color: inherit;
  506. }
  507. &>ul>li {
  508. margin-left: 0;
  509. &::before {
  510. display: none;
  511. }
  512. }
  513. a {
  514. text-decoration: none;
  515. color: inherit;
  516. }
  517. padding-bottom: 35px - 14px;
  518. border-bottom: 1px solid lighten($darkest, 8%);
  519. margin-bottom: 35px;
  520. }
  521. .cta-banner {
  522. background: $vibrant;
  523. border-radius: 4px;
  524. text-align: center;
  525. padding: 40px;
  526. h4 {
  527. font-size: 24px;
  528. line-height: 1.08;
  529. font-weight: 600;
  530. margin-bottom: 20px;
  531. color: #fff;
  532. }
  533. p {
  534. color: #fff;
  535. font-size: 18px;
  536. line-height: 1.22;
  537. margin-bottom: 20px;
  538. }
  539. &>a {
  540. font-weight: 500;
  541. color: $vibrant;
  542. background: #fff;
  543. border-radius: 4px;
  544. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  545. font-family: inherit;
  546. display: inline-block;
  547. text-align: center;
  548. font-size: 16px;
  549. text-decoration: none;
  550. line-height: 36px;
  551. padding: 4px 16px;
  552. margin: 0 auto;
  553. border: 0;
  554. cursor: pointer;
  555. &.secondary {
  556. padding: 2px 14px;
  557. border: 2px solid #fff;
  558. background: transparent;
  559. margin-left: 4px;
  560. color: #fff;
  561. }
  562. @media screen and (max-width: 375px) {
  563. margin-bottom: 10px;
  564. }
  565. }
  566. }
  567. .hint {
  568. margin: 26px 0;
  569. padding: 16px 16px 16px 56px;
  570. position: relative;
  571. border-left: 4px solid;
  572. border-radius: 4px;
  573. background-color: lighten($darkest, 8%);
  574. color: $white;
  575. font-size: 16px;
  576. line-height: 28px;
  577. &-info {
  578. border-color: $vibrant;
  579. .hint-icon {
  580. color: $vibrant;
  581. }
  582. }
  583. &-warning {
  584. border-color: #ca8f04;
  585. .hint-icon {
  586. color: #ca8f04;
  587. }
  588. }
  589. &-success {
  590. border-color: $success;
  591. .hint-icon {
  592. color: $success;
  593. }
  594. }
  595. &-danger {
  596. border-color: $error;
  597. .hint-icon {
  598. color: $error;
  599. }
  600. }
  601. &-icon {
  602. position: absolute;
  603. top: 18px;
  604. left: 16px;
  605. font-size: 24px;
  606. }
  607. }
  608. .page-ref {
  609. display: block;
  610. background: lighten($darkest, 4%);
  611. color: $vibrant;
  612. text-decoration: none;
  613. font-weight: 500;
  614. font-size: 18px;
  615. position: relative;
  616. margin: 26px 0;
  617. padding: 24px 24px 24px 50px;
  618. border-radius: 4px;
  619. &-icon {
  620. position: absolute;
  621. top: 20px;
  622. left: 16px;
  623. font-size: 24px;
  624. }
  625. &:hover,
  626. &:focus,
  627. &:active {
  628. background: lighten($darkest, 8%);
  629. }
  630. }
  631. .api-method {
  632. display: flex;
  633. align-items: center;
  634. font-weight: 500;
  635. font-size: 18px;
  636. &-method {
  637. display: inline-flex;
  638. align-items: center;
  639. padding: 2px 0;
  640. border-radius: 9999px;
  641. height: 21px;
  642. color: $white;
  643. background: $vibrant;
  644. margin: 0;
  645. margin-right: 8px;
  646. span {
  647. display: inline-block;
  648. padding: 0 8px;
  649. font-size: 12px;
  650. font-weight: 700;
  651. text-transform: uppercase;
  652. letter-spacing: 1px;
  653. line-height: 15px;
  654. }
  655. }
  656. &-url {
  657. background: lighten($darkest, 4%);
  658. border-radius: 4px;
  659. padding: 8px;
  660. font-size: 16px;
  661. margin: 26px 0;
  662. line-height: 1.7;
  663. }
  664. &-host {
  665. color: $darker;
  666. }
  667. &-path {
  668. font-weight: 700;
  669. color: $white;
  670. }
  671. }
  672. .api-method-parameters-list {
  673. border: 1px solid lighten($darkest, 8%);
  674. border-radius: 4px;
  675. margin-bottom: 26px;
  676. }
  677. .api-method-parameters-type {
  678. font-weight: 400;
  679. color: $darker;
  680. }
  681. .api-method-parameters-type,
  682. .api-method-response-example h5 {
  683. font-size: 16px;
  684. margin-bottom: 16px;
  685. }
  686. .api-method-parameter {
  687. display: flex;
  688. border-bottom: 1px solid lighten($darkest, 8%);
  689. &:last-child {
  690. border-bottom: 0;
  691. }
  692. &-cell {
  693. box-sizing: border-box;
  694. padding: 16px 10px;
  695. color: $white;
  696. }
  697. &-required {
  698. text-transform: uppercase;
  699. font-size: 12px;
  700. font-weight: 500;
  701. color: $error;
  702. }
  703. &-optional {
  704. text-transform: uppercase;
  705. font-size: 12px;
  706. font-weight: 500;
  707. color: $darker;
  708. }
  709. &-name {
  710. width: 180px;
  711. font-size: 16px;
  712. &>div:first-child {
  713. margin-bottom: 2px;
  714. }
  715. }
  716. &-type {
  717. width: 100px;
  718. }
  719. &-description {
  720. flex: 1 1 0%;
  721. font-size: 15px;
  722. }
  723. }
  724. .api-method-response-example {
  725. &-indicator {
  726. display: inline-block;
  727. width: 12px;
  728. height: 12px;
  729. border-radius: 50%;
  730. background: $success;
  731. &-error {
  732. background: $error;
  733. }
  734. }
  735. }
  736. .sponsorship {
  737. background: darken($darkest, 4%);
  738. border-radius: 4px;
  739. padding: 40px 0;
  740. h2 {
  741. line-height: 21px;
  742. font-weight: 500;
  743. font-size: 16px;
  744. color: lighten($darkest, 40%);
  745. text-align: center;
  746. margin-bottom: 20px;
  747. }
  748. .logo-grid {
  749. display: flex;
  750. align-items: center;
  751. justify-content: center;
  752. flex-direction: row;
  753. &>div {
  754. display: flex;
  755. align-items: center;
  756. justify-content: center;
  757. flex-direction: row;
  758. }
  759. a {
  760. display: inline-block;
  761. text-decoration: none;
  762. padding: 0 10px;
  763. img {
  764. display: block;
  765. margin: 0;
  766. height: 28px;
  767. width: auto;
  768. opacity: 0.8;
  769. transition: all $transition-in;
  770. filter: grayscale(100%);
  771. }
  772. &:hover {
  773. img {
  774. opacity: 0.9;
  775. transition: all $transition-out;
  776. filter: grayscale(0%);
  777. }
  778. }
  779. }
  780. }
  781. h2 {
  782. color: $lightest;
  783. }
  784. .logo-grid>div {
  785. flex-wrap: wrap;
  786. }
  787. .logo-grid a {
  788. padding: 20px;
  789. }
  790. }
  791. .heading {
  792. display: flex;
  793. align-items: center;
  794. &__anchor-link {
  795. display: inline-flex;
  796. align-content: center;
  797. margin-left: 0.25em;
  798. }
  799. }