pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
452 lines
11 KiB
452 lines
11 KiB
/* Fira Code, including characters used by Rich output, like the "heavy right-pointing angle bracket ornament", not included in Google Fonts */
|
|
@import url(https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css);
|
|
/* Noto Color Emoji for emoji support with the same font everywhere */
|
|
@import url(https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap);
|
|
|
|
/* Override default code font in Material for MkDocs to Fira Code */
|
|
:root {
|
|
--md-code-font: "Fira Code", monospace, "Noto Color Emoji";
|
|
}
|
|
|
|
/* Override default regular font in Material for MkDocs to include Noto Color Emoji */
|
|
:root {
|
|
--md-text-font: "Roboto", "Noto Color Emoji";
|
|
}
|
|
|
|
.termynal-comment {
|
|
color: #4a968f;
|
|
font-style: italic;
|
|
display: block;
|
|
}
|
|
|
|
.termy {
|
|
/* For right to left languages */
|
|
direction: ltr;
|
|
}
|
|
|
|
.termy [data-termynal] {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.termy .linenos {
|
|
display: none;
|
|
}
|
|
|
|
/* External links: detected by JS comparing origin to site origin
|
|
JS sets data-external-link on links pointing outside the site
|
|
Skip image links, .no-link-icon, and .announce-link */
|
|
a[data-external-link]:not(:has(img)):not(.no-link-icon):not(.announce-link) {
|
|
/* For right to left languages */
|
|
direction: ltr;
|
|
display: inline-block;
|
|
}
|
|
|
|
a[data-external-link]:not(:has(img)):not(.no-link-icon):not(.announce-link)::after {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 0.75em;
|
|
height: 0.75em;
|
|
margin-left: 0.25em;
|
|
vertical-align: middle;
|
|
opacity: 0.55;
|
|
background: currentColor;
|
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
|
|
-webkit-mask-size: contain;
|
|
-webkit-mask-repeat: no-repeat;
|
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
|
|
mask-size: contain;
|
|
mask-repeat: no-repeat;
|
|
}
|
|
|
|
a[data-external-link]:not(:has(img)):not(.no-link-icon):not(.announce-link):hover::after {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
/* Internal links opening in new tab: same-origin links with target=_blank
|
|
JS sets data-internal-link on links pointing to the same site origin
|
|
Skip image links, .no-link-icon, and .announce-link */
|
|
a[data-internal-link][target="_blank"]:not(:has(img)):not(.no-link-icon):not(.announce-link) {
|
|
/* For right to left languages */
|
|
direction: ltr;
|
|
display: inline-block;
|
|
}
|
|
|
|
a[data-internal-link][target="_blank"]:not(:has(img)):not(.no-link-icon):not(.announce-link)::after {
|
|
content: "";
|
|
display: inline-block;
|
|
width: 0.75em;
|
|
height: 0.75em;
|
|
margin-left: 0.25em;
|
|
vertical-align: middle;
|
|
opacity: 0.55;
|
|
background: currentColor;
|
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='14' height='14' rx='2'/%3E%3Cpath d='M7 3h14v14'/%3E%3C/svg%3E");
|
|
-webkit-mask-size: contain;
|
|
-webkit-mask-repeat: no-repeat;
|
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='14' height='14' rx='2'/%3E%3Cpath d='M7 3h14v14'/%3E%3C/svg%3E");
|
|
mask-size: contain;
|
|
mask-repeat: no-repeat;
|
|
}
|
|
|
|
a[data-internal-link][target="_blank"]:not(:has(img)):not(.no-link-icon):not(.announce-link):hover::after {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
/* Disable link icons in footer and header nav */
|
|
.md-footer a::after,
|
|
.md-header a::after {
|
|
content: none !important;
|
|
}
|
|
|
|
.shadow {
|
|
box-shadow: 5px 5px 10px #999;
|
|
}
|
|
|
|
/* Give space to lower icons so Gitter chat doesn't get on top of them */
|
|
.md-footer-meta {
|
|
padding-bottom: 2em;
|
|
}
|
|
|
|
.md-footer-meta .md-social {
|
|
padding-right: 4rem;
|
|
}
|
|
|
|
.user-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.user-list-center {
|
|
justify-content: space-evenly;
|
|
}
|
|
|
|
.user {
|
|
margin: 1em;
|
|
min-width: 7em;
|
|
}
|
|
|
|
.user .avatar-wrapper {
|
|
width: 80px;
|
|
height: 80px;
|
|
margin: 10px auto;
|
|
overflow: hidden;
|
|
border-radius: 50%;
|
|
position: relative;
|
|
}
|
|
|
|
.user .avatar-wrapper img {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
.user .title {
|
|
text-align: center;
|
|
}
|
|
|
|
.user .count {
|
|
font-size: 80%;
|
|
text-align: center;
|
|
}
|
|
|
|
a.announce-link:link,
|
|
a.announce-link:visited {
|
|
color: #fff;
|
|
}
|
|
|
|
a.announce-link:hover {
|
|
color: var(--md-accent-fg-color);
|
|
}
|
|
|
|
.announce-wrapper {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.announce-wrapper #announce-left div.item {
|
|
display: none;
|
|
}
|
|
|
|
.announce-wrapper #announce-right {
|
|
display: none;
|
|
}
|
|
|
|
.announce-wrapper #announce-right div.item {
|
|
display: none;
|
|
}
|
|
|
|
.announce-wrapper .sponsor-badge {
|
|
display: block;
|
|
position: absolute;
|
|
top: -10px;
|
|
right: 0;
|
|
font-size: 0.5rem;
|
|
color: #e6e6e6;
|
|
background-color: #666;
|
|
border-radius: 10px;
|
|
padding: 0 10px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.announce-wrapper .sponsor-image {
|
|
display: block;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.announce-wrapper>div {
|
|
min-height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.twitter {
|
|
color: #00acee;
|
|
}
|
|
|
|
/* Right to left languages */
|
|
code {
|
|
direction: ltr;
|
|
display: inline-block;
|
|
}
|
|
|
|
.illustration {
|
|
margin-top: 2em;
|
|
margin-bottom: 2em;
|
|
}
|
|
|
|
/* Screenshots */
|
|
/*
|
|
Simulate a browser window frame.
|
|
Inspired by Termynal's CSS tricks with modifications
|
|
*/
|
|
|
|
.screenshot {
|
|
display: block;
|
|
background-color: #d3e0de;
|
|
border-radius: 4px;
|
|
padding: 45px 5px 5px;
|
|
position: relative;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.screenshot img {
|
|
display: block;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.screenshot:before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 15px;
|
|
left: 15px;
|
|
display: inline-block;
|
|
width: 15px;
|
|
height: 15px;
|
|
border-radius: 50%;
|
|
/* A little hack to display the window buttons in one pseudo element. */
|
|
background: #d9515d;
|
|
-webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
|
|
box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
|
|
}
|
|
|
|
.doc-param-details .highlight {
|
|
overflow-x: auto;
|
|
width: 0;
|
|
min-width: 100%;
|
|
}
|
|
|
|
.md-typeset dfn {
|
|
border-bottom: .05rem dotted var(--md-default-fg-color--light);
|
|
cursor: help;
|
|
}
|
|
|
|
/* Opinions: interactive logo tabs */
|
|
.fastapi-opinions {
|
|
margin: 1.5rem 0 2rem;
|
|
}
|
|
.fastapi-opinions__tabs {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 0.25rem;
|
|
margin-bottom: 1.5rem;
|
|
border-bottom: 1px solid var(--md-default-fg-color--lightest);
|
|
}
|
|
.fastapi-opinions__tab {
|
|
position: relative;
|
|
appearance: none;
|
|
background: none;
|
|
border: 0;
|
|
padding: 0.625rem 0.5rem;
|
|
margin: 0;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: inherit;
|
|
font: inherit;
|
|
min-height: 40px;
|
|
min-width: 0;
|
|
}
|
|
.fastapi-opinions__tab::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 50%;
|
|
right: 50%;
|
|
bottom: -1px;
|
|
height: 2px;
|
|
background-color: var(--md-primary-fg-color);
|
|
opacity: 0;
|
|
transition: left 0.2s ease, right 0.2s ease, opacity 0.2s ease;
|
|
}
|
|
.fastapi-opinions__tab[aria-selected="true"]::after {
|
|
left: 12%;
|
|
right: 12%;
|
|
opacity: 1;
|
|
}
|
|
.fastapi-opinions__tab:focus-visible {
|
|
outline: 2px solid var(--md-primary-fg-color);
|
|
outline-offset: 2px;
|
|
border-radius: 4px;
|
|
}
|
|
.fastapi-opinions__mark {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 22px;
|
|
max-width: 100%;
|
|
filter: grayscale(1);
|
|
opacity: 0.5;
|
|
transition: filter 0.2s, opacity 0.2s;
|
|
}
|
|
.fastapi-opinions__mark img {
|
|
height: 100%;
|
|
width: auto;
|
|
max-width: 100%;
|
|
object-fit: contain;
|
|
display: block;
|
|
}
|
|
.fastapi-opinions__tab:hover .fastapi-opinions__mark {
|
|
filter: grayscale(0.3);
|
|
opacity: 0.85;
|
|
}
|
|
.fastapi-opinions__tab[aria-selected="true"] .fastapi-opinions__mark {
|
|
filter: grayscale(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Dark mode: brighten dark wordmarks so they read on slate */
|
|
[data-md-color-scheme="slate"] .fastapi-opinions__mark {
|
|
filter: grayscale(1) invert(0.85);
|
|
}
|
|
[data-md-color-scheme="slate"] .fastapi-opinions__tab:hover .fastapi-opinions__mark {
|
|
filter: grayscale(0.3) invert(0.4);
|
|
}
|
|
[data-md-color-scheme="slate"] .fastapi-opinions__tab[aria-selected="true"] .fastapi-opinions__mark {
|
|
filter: none;
|
|
}
|
|
|
|
.fastapi-opinions__panel {
|
|
position: relative;
|
|
padding: 0.5rem 1rem 0.5rem 3rem;
|
|
}
|
|
.fastapi-opinions__panel::before {
|
|
content: "\201C";
|
|
position: absolute;
|
|
top: -0.75rem;
|
|
left: 0.25rem;
|
|
font-family: Georgia, "Times New Roman", serif;
|
|
font-size: 4rem;
|
|
line-height: 1;
|
|
color: var(--md-primary-fg-color);
|
|
opacity: 0.18;
|
|
pointer-events: none;
|
|
}
|
|
.md-typeset blockquote.fastapi-opinions__quote {
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
font-style: italic;
|
|
line-height: 1.65;
|
|
color: var(--md-default-fg-color);
|
|
border-left: 0;
|
|
padding-left: 0;
|
|
}
|
|
.fastapi-opinions__quote strong { font-style: normal; }
|
|
.fastapi-opinions__attr {
|
|
margin-top: 0.875rem;
|
|
font-size: 0.8rem;
|
|
color: var(--md-default-fg-color--light);
|
|
}
|
|
.fastapi-opinions__attr strong { color: var(--md-default-fg-color); }
|
|
.fastapi-opinions__attr a {
|
|
color: var(--md-primary-fg-color);
|
|
text-decoration: none;
|
|
font-size: 0.75rem;
|
|
margin-left: 0.25rem;
|
|
}
|
|
.fastapi-opinions__attr a:hover { text-decoration: underline; }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.fastapi-opinions__tab::after { transition: none; }
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.fastapi-opinions__tabs { gap: 0.125rem; }
|
|
.fastapi-opinions__mark { height: 18px; }
|
|
.fastapi-opinions__panel { padding-left: 2.25rem; }
|
|
.fastapi-opinions__panel::before { font-size: 3rem; }
|
|
}
|
|
|
|
.fastapi-sponsors {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: 1rem 1.25rem;
|
|
margin: 1rem 0 2rem;
|
|
}
|
|
|
|
.fastapi-sponsors__card {
|
|
transition: transform 0.15s ease;
|
|
}
|
|
|
|
.fastapi-sponsors__card:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.fastapi-sponsors__card--keystone {
|
|
width: 100%;
|
|
max-width: 560px;
|
|
}
|
|
|
|
.fastapi-sponsors__banner {
|
|
display: block;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.fastapi-sponsors__card--keystone .fastapi-sponsors__banner { width: 100%; }
|
|
.fastapi-sponsors__card--gold .fastapi-sponsors__banner { height: 80px; }
|
|
.fastapi-sponsors__card--silver .fastapi-sponsors__banner { height: 60px; }
|
|
|
|
@media (max-width: 600px) {
|
|
.fastapi-sponsors__card--gold .fastapi-sponsors__banner { height: 64px; }
|
|
.fastapi-sponsors__card--silver .fastapi-sponsors__banner { height: 50px; }
|
|
}
|
|
|
|
.fastapi-feature-banner {
|
|
display: block;
|
|
max-width: 680px;
|
|
margin: 1rem auto 1.5rem;
|
|
}
|
|
.fastapi-feature-banner img {
|
|
display: block;
|
|
width: 100%;
|
|
border-radius: 12px;
|
|
}
|
|
|
|
/* Hidden in MkDocs; rendered on GitHub (which doesn't load this stylesheet) */
|
|
.only-github { display: none; }
|
|
|