style.scss 14 KB

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