123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038 |
- @import 'roboto-mono.scss';
- @import 'manrope.scss';
- // Values from the Mastodon UI
- $black: #000000; // Black
- $white: #ffffff; // White
- $red-600: #b7253d !default; // Deep Carmine
- $red-500: #df405a !default; // Cerise
- $blurple-600: #563acc; // Iris
- $blurple-500: #6364ff; // Brand purple
- $blurple-400: #7477fd; // Medium slate blue
- $blurple-300: #858afa; // Faded Blue
- $grey-600: hsl(240deg, 8%, 33%); // Trout
- $grey-100: hsl(240deg, 51%, 90%); // Topaz
- $success-green: #79bd9a !default; // Padua
- $error-red: $red-500 !default; // Cerise
- $warning-red: #ff5050 !default; // Sunset Orange
- $gold-star: #ca8f04 !default; // Dark Goldenrod
- $classic-base-color: hsl(240deg, 16%, 19%);
- $classic-primary-color: hsl(240deg, 29%, 70%);
- $classic-secondary-color: hsl(255deg, 25%, 88%);
- $classic-highlight-color: $blurple-500;
- // Custom values
- $lightest: $white; // color2
- $lighter: $classic-secondary-color; // color3
- $darkest: darken($classic-base-color, 8%); // color1
- $darker: $classic-primary-color;
- $vibrant: lighten($blurple-500, 8%); // color4
- $error: $warning-red; // color6
- $warning: $gold-star;
- $success: $success-green; // color7
- $background-border-color: lighten($classic-base-color, 4%);
- $highlight-border-color: $vibrant;
- $warning-border-color: $gold-star;
- $alert-border-color: $warning-red;
- $success-border-color: $success-green;
- $transition-in: 100ms linear;
- $transition-out: 250ms linear;
- $content-width: 1080px;
- $mobile-width: 600px;
- /* http://meyerweb.com/eric/tools/css/reset/
- v2.0 | 20110126
- License: none (public domain)
- */
- html,
- body,
- div,
- span,
- applet,
- object,
- iframe,
- h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- p,
- blockquote,
- pre,
- a,
- abbr,
- acronym,
- address,
- big,
- cite,
- code,
- del,
- dfn,
- em,
- img,
- ins,
- kbd,
- q,
- s,
- samp,
- small,
- strike,
- strong,
- sub,
- sup,
- tt,
- var,
- b,
- u,
- i,
- center,
- dl,
- dt,
- dd,
- ol,
- ul,
- li,
- fieldset,
- form,
- label,
- legend,
- table,
- caption,
- tbody,
- tfoot,
- thead,
- tr,
- th,
- td,
- article,
- aside,
- canvas,
- details,
- embed,
- figure,
- figcaption,
- footer,
- header,
- hgroup,
- menu,
- nav,
- output,
- ruby,
- section,
- summary,
- time,
- mark,
- audio,
- video {
- margin: 0;
- padding: 0;
- border: 0;
- font: inherit;
- vertical-align: baseline;
- }
- /* HTML5 display-role reset for older browsers */
- article,
- aside,
- details,
- figcaption,
- figure,
- footer,
- header,
- hgroup,
- menu,
- nav,
- section {
- display: block;
- }
- body {
- line-height: 1;
- box-sizing: border-box;
- text-rendering: optimizelegibility;
- font-feature-settings: "kern";
- -webkit-text-size-adjust: none;
- text-size-adjust: none;
- }
- ol,
- ul {
- list-style: none;
- }
- blockquote,
- q {
- quotes: none;
- }
- blockquote:before,
- blockquote:after,
- q:before,
- q:after {
- content: '';
- content: none;
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
- a {
- outline: 0;
- }
- body {
- box-sizing: border-box;
- font-family: 'Manrope', sans-serif;
- text-rendering: optimizeLegibility;
- background-color: $darkest;
- color: $lighter;
- font-size: 13px;
- line-height: 18px;
- font-weight: 400;
- padding-top: 30px;
- }
- .container {
- box-sizing: border-box;
- max-width: $content-width;
- margin: 0 auto;
- padding: 0 20px;
- }
- .sidebar-layout {
- display: grid;
- grid-gap: 15px;
- grid-template-columns: 260px minmax(300px, ($content-width - 260px));
- grid-template-rows: auto;
- margin-bottom: 30px;
- @media screen and (max-width: $mobile-width) {
- display: block;
- }
- }
- .sidebar {
- @media screen and (max-width: $mobile-width) {
- margin-bottom: 60px;
- // css menu toggle for mobile.
- // when the checkbox is checked, the menu shows,
- // othewise it's hidden.
- // it's important for it all to be scoped inside this media query,
- // that way on larger screens the menu will always show even if the checkbox is unchecked.
- input[type="checkbox"] {
- display: none;
- }
- label {
- font-size: 1.2rem;
- display: flex;
- justify-content: flex-end;
- margin-bottom: 2rem;
- }
- label i {
- margin-right: .25rem;
- }
- input[type="checkbox"]:not(:checked) + label > .menu-open {
- display: none;
- }
- input[type="checkbox"]:checked + label > .menu-close {
- display: none;
- }
- & > ul {
- display: none;
- }
- #mobile-nav-toggle:checked ~ ul {
- display: block;
- }
- }
- // on viewport sizes larger than mobile, always hide the mobile nav toggle.
- @media screen and (min-width: $mobile-width) {
- .mobile-nav-toggle,
- .mobile-nav-toggle + label {
- display: none;
- }
- }
- .brand {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- color: $darkest;
- margin-top: 12px;
- margin-bottom: 52px;
- img {
- height: 38px;
- }
- @media screen and (max-width: $mobile-width) {
- justify-content: center;
- img {
- position: static;
- }
- }
- }
- &>ul>li {
- margin-bottom: 26px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- .sub-title {
- display: block;
- padding: 10px;
- font-weight: 500;
- text-transform: uppercase;
- color: $darker;
- }
- &>ul a {
- display: block;
- color: $lighter;
- text-decoration: none;
- font-weight: 500;
- padding: 10px;
- &:hover {
- color: $lightest;
- }
- }
- .sub-menu {
- a.active {
- color: $vibrant;
- }
- &.collapsed {
- display: none;
- }
- .sub-menu {
- padding-left: 15px;
- }
- }
- }
- .footer {
- padding-bottom: 30px;
- .legal {
- margin-top: 30px;
- &--right {
- float: right;
- text-align: right;
- @media screen and (max-width: $mobile-width) {
- float: none;
- text-align: left;
- }
- }
- a {
- color: $darker;
- text-decoration: none;
- }
- svg {
- vertical-align: middle;
- }
- }
- }
- main {
- h1 {
- font-size: 36px;
- line-height: 1.48;
- font-weight: 600;
- color: $lighter;
- padding-bottom: 35px;
- border-bottom: 1px solid $background-border-color;
- margin-bottom: 35px;
- margin-left: -2.63px;
- text-align: left;
- position: relative;
- }
- h2 {
- font-size: 26px;
- margin-left: -1.63px;
- line-height: 1.22;
- text-align: left;
- margin-top: 50px;
- margin-bottom: 30px;
- font-weight: 600;
- color: $lighter;
- }
- h3 {
- font-size: 21px;
- line-height: 1.22;
- font-weight: 500;
- color: $lighter;
- margin-top: 25px;
- margin-bottom: 30px;
- margin-left: -1.75px;
- text-align: left;
- }
- h4 {
- font-size: 18px;
- line-height: 1.22;
- font-weight: 500;
- color: $lighter;
- margin-top: 25px;
- margin-bottom: 30px;
- margin-left: -1.75px;
- text-align: left;
- }
- h5 {
- font-size: 18px;
- line-height: 1.22;
- font-weight: 500;
- color: $lighter;
- margin-top: 25px;
- margin-bottom: 30px;
- margin-left: -1.75px;
- text-align: left;
- }
- h6 {
- font-weight: 700;
- margin-top: 25px;
- margin-left: -1.75px;
- text-align: left;
- color: $lighter;
- font-size: 16px;
- line-height: 28px;
- margin-bottom: 26px;
- }
- blockquote {
- color: $lightest;
- font-size: 16px;
- line-height: 28px;
- font-style: italic;
- border-left: 3px solid $vibrant;
- padding-left: 20px;
- margin-left: -23px;
- padding-bottom: 2px;
- margin-bottom: 26px;
- p:last-child {
- margin-bottom: 0;
- }
- }
- p {
- color: $lightest;
- font-size: 16px;
- line-height: 28px;
- font-weight: normal;
- margin-bottom: 26px;
- -webkit-hyphens: auto;
- hyphens: auto;
- }
- a {
- color: $darker;
- text-decoration: none;
- &:hover {
- text-decoration: underline;
- }
- }
- img {
- display: block;
- margin: 0 auto;
- max-width: 100%;
- height: auto;
- border-radius: 4px;
- }
- .image-large {
- margin-bottom: 50px;
- }
- .image-pull-left {
- float: left;
- }
- em {
- font-style: italic;
- }
- strong {
- font-weight: 600;
- color: #fff;
- }
- ul,
- ol {
- counter-reset: post;
- margin-bottom: 26px;
- }
- ul li,
- ol li {
- margin-left: 30px;
- margin-bottom: 14px;
- color: $lightest;
- font-size: 16px;
- line-height: 28px;
- &::before {
- position: absolute;
- display: inline-block;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- width: 78px;
- margin-left: -78px;
- text-align: right;
- padding-right: 15px;
- content: '\2022';
- }
- }
- ol>li {
- &::before {
- padding-top: 0;
- content: counter(post) ". ";
- counter-increment: post;
- }
- }
- li>ul,
- li>ol {
- margin-top: 14px;
- }
- table {
- width: 100%;
- margin-bottom: 26px;
- color: $lightest;
- border-collapse: separate;
- border-spacing: 0;
- border: 1px solid $background-border-color;
- border-radius: 4px;
- th,
- td {
- font-size: 16px;
- line-height: 28px;
- padding: 10px 15px;
- vertical-align: middle;
- border-bottom: 1px solid $background-border-color;
- .fa-check {
- color: $success;
- }
- .fa-times {
- color: $error;
- }
- }
- thead th {
- font-weight: 500;
- }
- tr:first-child th {
- font-weight: bold;
- }
- tr:last-child td {
- border-bottom: 0;
- }
- }
- figure {
- figcaption {
- margin-top: 8px;
- text-align: center;
- &,
- p {
- color: $darker;
- }
- }
- }
- hr {
- background: transparent;
- border: 0;
- border-top: 1px solid $background-border-color;
- margin: 26px 0;
- }
- pre {
- margin-bottom: 26px;
- font-size: 16px;
- line-height: 28px;
- background-color: lighten($darkest, 4%);
- border-radius: 4px;
- padding: 16px;
- overflow: auto;
- }
- figure pre {
- margin-bottom: 0;
- }
- code {
- padding: 0.2em 0.4em;
- margin: 0;
- font-size: 85%;
- font-family: 'Roboto Mono', monospace;
- background-color: lighten($darkest, 4%);
- border-radius: 4px;
- -webkit-hyphens: none;
- hyphens: none;
- white-space: pre;
- }
- pre code {
- background: transparent;
- padding: 0;
- }
- dl {
- color: $lightest;
- font-size: 16px;
- line-height: 28px;
- font-weight: normal;
- margin-bottom: 26px;
- -webkit-hyphens: auto;
- hyphens: auto;
- dt {
- font-weight: 700;
- background: lighten($darkest, 8%);
- padding: 2px 16px;
- max-width: max-content;
- margin-bottom: 4px;
- }
- dd {
- margin-left: 16px;
- margin-bottom: 16px;
- }
- }
- .mastodon-embed,
- iframe {
- width: 100%;
- display: block;
- margin: 0 auto;
- margin-bottom: 26px;
- border-radius: 4px;
- box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
- }
- }
- .mascot {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-bottom: 60px;
- @media screen and (max-width: $mobile-width) {
- display: none;
- }
- }
- #TableOfContents {
- color: $darker;
- ul li {
- color: inherit;
- }
- &>ul>li {
- margin-left: 0;
- &::before {
- display: none;
- }
- }
- a {
- text-decoration: none;
- color: $darker;
- &:hover {
- text-decoration: underline;
- }
- }
- padding-bottom: 35px - 14px;
- border-bottom: 1px solid $background-border-color;
- margin-bottom: 35px;
- }
- .cta-banner {
- background: $vibrant;
- border-radius: 4px;
- text-align: center;
- padding: 40px;
- h4 {
- font-size: 24px;
- line-height: 1.08;
- font-weight: 600;
- margin-bottom: 20px;
- color: #fff;
- }
- p {
- color: #fff;
- font-size: 18px;
- line-height: 1.22;
- margin-bottom: 20px;
- }
- &>a {
- font-weight: 500;
- color: $vibrant;
- background: #fff;
- border-radius: 4px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- font-family: inherit;
- display: inline-block;
- text-align: center;
- font-size: 16px;
- text-decoration: none;
- line-height: 36px;
- padding: 4px 16px;
- margin: 0 auto;
- border: 0;
- cursor: pointer;
- &.secondary {
- padding: 2px 14px;
- border: 2px solid $white;
- background: transparent;
- margin-left: 4px;
- color: $white;
- }
- @media screen and (max-width: 375px) {
- margin-bottom: 10px;
- }
- }
- }
- .hint {
- margin: 26px 0;
- padding: 16px 16px 16px 66px;
- position: relative;
- border-radius: 4px;
- border: 1px solid $background-border-color;
- color: $white;
- font-size: 16px;
- line-height: 28px;
- &-info {
- border-color: $highlight-border-color;
- .hint-icon {
- color: $highlight-border-color;
- }
- }
- &-warning {
- border-color: $warning-border-color;
- .hint-icon {
- color: $warning-border-color;
- }
- }
- &-success {
- border-color: $success-border-color;
- .hint-icon {
- color: $success-border-color;
- }
- }
- &-danger {
- border-color: $alert-border-color;
- .hint-icon {
- color: $alert-border-color;
- }
- }
- &-icon {
- position: absolute;
- top: 14px;
- left: 18px;
- font-size: 24px;
- }
- }
- .page-ref {
- display: block;
- background: lighten($darkest, 4%);
- color: $vibrant;
- text-decoration: none;
- font-weight: 500;
- font-size: 18px;
- position: relative;
- margin: 26px 0;
- padding: 24px 24px 24px 50px;
- border-radius: 4px;
- &-icon {
- position: absolute;
- top: 16px;
- left: 16px;
- font-size: 24px;
- }
- &:hover,
- &:focus,
- &:active {
- background: lighten($darkest, 8%);
- text-decoration: none;
- }
- }
- .api-method {
- display: flex;
- align-items: center;
- font-weight: 500;
- font-size: 18px;
- &-method {
- display: inline-flex;
- align-items: center;
- padding: 2px 0;
- border-radius: 9999px;
- height: 21px;
- color: $white;
- background: $vibrant;
- margin: 0;
- margin-right: 8px;
- span {
- display: inline-block;
- padding: 0 8px;
- font-size: 12px;
- font-weight: 700;
- text-transform: uppercase;
- letter-spacing: 1px;
- line-height: 15px;
- }
- }
- &-url {
- background: lighten($darkest, 4%);
- border-radius: 4px;
- padding: 8px;
- font-size: 16px;
- margin: 26px 0;
- line-height: 1.7;
- }
- &-host {
- color: $darker;
- }
- &-path {
- font-weight: 700;
- color: $white;
- }
- }
- .api-method-parameters-list {
- border: 1px solid $background-border-color;
- border-radius: 4px;
- margin-bottom: 26px;
- }
- .api-method-parameters-type {
- font-weight: 400;
- color: $darker;
- }
- .api-method-parameters-type,
- .api-method-response-example h5 {
- font-size: 16px;
- margin-bottom: 16px;
- }
- .api-method-parameter {
- display: flex;
- border-bottom: 1px solid $background-border-color;
- &:last-child {
- border-bottom: 0;
- }
- &-cell {
- box-sizing: border-box;
- padding: 16px 10px;
- color: $white;
- }
- &-required {
- text-transform: uppercase;
- font-size: 12px;
- font-weight: 500;
- color: $error;
- }
- &-removed {
- text-transform: uppercase;
- font-size: 12px;
- font-weight: 500;
- color: $error;
- }
- &-deprecated {
- text-transform: uppercase;
- font-size: 12px;
- font-weight: 500;
- color: $warning;
- }
- &-optional {
- text-transform: uppercase;
- font-size: 12px;
- font-weight: 500;
- color: $darker;
- }
- &-name {
- width: 180px;
- font-size: 16px;
- &>div:first-child {
- margin-bottom: 2px;
- }
- }
- &-type {
- width: 100px;
- }
- &-description {
- flex: 1 1 0%;
- font-size: 15px;
- }
- }
- .api-method-response-example {
- &-indicator {
- display: inline-block;
- width: 12px;
- height: 12px;
- border-radius: 50%;
- background: $success;
- &-error {
- background: $error;
- }
- }
- }
- .sponsorship {
- border-radius: 4px;
- border: 1px solid $background-border-color;
- padding: 40px 0;
- h2 {
- line-height: 21px;
- font-weight: 500;
- font-size: 16px;
- color: $darker;
- text-align: center;
- margin-bottom: 20px;
- }
- .logo-grid {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: row;
- &>div {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: row;
- }
- a {
- display: inline-block;
- text-decoration: none;
- padding: 0 10px;
- img {
- display: block;
- margin: 0;
- height: 28px;
- width: auto;
- opacity: 0.8;
- transition: all $transition-in;
- filter: grayscale(100%);
- }
- &:hover {
- img {
- opacity: 0.9;
- transition: all $transition-out;
- filter: grayscale(0%);
- }
- }
- }
- }
- h2 {
- color: $lightest;
- }
- .logo-grid>div {
- flex-wrap: wrap;
- }
- .logo-grid a {
- padding: 20px;
- }
- }
- .heading {
- display: flex;
- align-items: center;
- &__anchor-link {
- display: inline-flex;
- align-content: center;
- margin-left: 0.25em;
- }
- }
|