blob: 51054bd5cfa09b0bc2694db77f8bce7be2ba2bc3 [file] [log] [blame]
/*!
* Copyright 2020 The Go Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/* stylelint-disable no-descending-specificity */
.UnitDoc {
margin-bottom: 2rem;
word-break: break-word;
}
.UnitDoc h2 a.UnitDoc-idLink,
.UnitDoc summary a {
opacity: 0;
}
.UnitDoc h2:hover a,
.UnitDoc summary:focus a,
.UnitDoc h2 a.UnitDoc-idLink:focus {
opacity: 1;
}
.UnitDoc-title {
border-bottom: var(--border);
padding-bottom: 1rem;
}
.UnitDoc-title img {
margin: auto 1rem auto 0;
}
.UnitDoc-emptySection {
background-color: var(--color-background-accented);
color: var(--color-text-subtle);
height: 12.25rem;
margin-top: 1.5rem;
text-align: center;
}
.UnitDoc-emptySection img {
height: 7.8125rem;
width: auto;
}
.Documentation .UnitDoc-emptySection p {
margin: 1rem auto;
}
.UnitDoc .Documentation h4 {
margin-top: 1.5rem;
}
.Documentation {
display: block;
}
.Documentation p {
margin: 1rem 0;
}
.Documentation h2,
.Documentation h3 {
margin-top: 1.5rem;
}
.Documentation a:hover {
text-decoration: underline;
}
.Documentation h2 a,
.Documentation h3 a,
.Documentation h4 a.Documentation-idLink,
.Documentation summary a {
opacity: 0;
}
.Documentation a:focus {
opacity: 1;
}
.Documentation h3 a.Documentation-source {
opacity: 1;
}
.Documentation h2:hover a,
.Documentation h3:hover a,
.Documentation h4:hover a,
.Documentation summary:hover a,
.Documentation summary:focus a,
.Documentation h4 a.Documentation-idLink:focus {
opacity: 1;
}
.Documentation ul {
line-height: 1.5rem;
list-style: none;
padding-left: 0;
}
.Documentation ul ul {
padding-left: 2em;
}
.Documentation .Documentation-bulletList {
list-style: disc;
margin-bottom: 1rem;
padding-left: 2rem;
}
.Documentation .Documentation-numberList {
list-style: decimal;
margin-bottom: 1rem;
padding-left: 2rem;
}
.Documentation pre + pre {
margin-top: 0.625rem;
}
.Documentation .Documentation-declarationLink + pre {
border-radius: 0 0 0.3em 0.3em;
border-top: var(--border);
margin-top: 0;
}
.Documentation pre .comment {
color: var(--color-code-comment);
}
.Documentation-toc,
.Documentation-overview,
.Documentation-index,
.Documentation-examples {
padding-bottom: 0;
}
.Documentation-empty {
color: var(--color-text-subtle);
margin-top: -0.5rem;
}
@media only screen and (min-width: 64rem) {
.Documentation-toc {
margin-left: 2rem;
white-space: nowrap;
}
.Documentation-toc-columns {
columns: 2;
}
}
.Documentation-toc:empty {
display: none;
}
.Documentation-tocItem {
overflow: hidden;
text-overflow: ellipsis;
}
.Documentation-tocItem--constants,
.Documentation-tocItem--funcsAndTypes,
.Documentation-tocItem--functions,
.Documentation-tocItem--types,
.Documentation-tocItem--variables,
.Documentation-tocItem--notes {
display: none;
}
.Documentation-overviewHeader,
.Documentation-indexHeader,
.Documentation-constantsHeader,
.Documentation-variablesHeader,
.Documentation-examplesHeader,
.Documentation-filesHeader,
.Documentation-functionHeader,
.Documentation-typeHeader,
.Documentation-typeMethodHeader,
.Documentation-typeFuncHeader {
margin-bottom: 0.5rem;
}
h4.Documentation-functionHeader,
h4.Documentation-typeHeader,
h4.Documentation-typeFuncHeader,
h4.Documentation-typeMethodHeader {
align-items: baseline;
display: flex;
justify-content: space-between;
}
.Documentation-sinceVersion {
color: var(--color-text-subtle);
font-size: 0.9375rem;
font-weight: 400;
}
.Documentation-constants br:last-of-type,
.Documentation-variables br:last-of-type {
display: none;
}
.Documentation-build {
color: var(--color-text-subtle);
padding-top: 1.5rem;
text-align: right;
}
.Documentation-declaration pre {
scroll-padding-top: calc(var(--js-sticky-header-height, 3.5rem) + 3.75rem);
}
@media only screen and (min-width: 64rem) {
.Documentation-declaration pre {
scroll-padding-top: calc(var(--js-sticky-header-height, 3.5rem) + 0.75rem);
}
}
.Documentation-declaration + .Documentation-declaration {
margin-top: 0.625rem;
}
.Documentation-declarationLink {
background-color: var(--color-background-accented);
border: var(--border);
border-bottom: none;
border-radius: 0.3em 0.3em 0 0;
display: block;
font-size: 0.75rem;
line-height: 0.5rem;
padding: 0.375rem;
text-align: right;
}
.Documentation-exampleButtonsContainer {
align-items: center;
display: flex;
justify-content: flex-end;
margin-top: 0.5rem;
}
.Documentation-examplePlayButton {
background-color: var(--white);
border: 0.15rem solid var(--turq-med);
color: var(--turq-med);
cursor: pointer;
flex-shrink: 0;
height: 2.5rem;
width: 4.125rem;
}
.Documentation-exampleRunButton,
.Documentation-exampleShareButton,
.Documentation-exampleFormatButton {
border: 0.0625rem solid var(--turq-dark);
border-radius: 0.25rem;
cursor: pointer;
height: 2rem;
margin-left: 0.5rem;
padding: 0 1rem;
}
.Documentation-exampleRunButton {
background-color: var(--turq-dark);
color: var(--white);
}
.Documentation-exampleShareButton,
.Documentation-exampleFormatButton {
background-color: var(--white);
color: var(--turq-dark);
}
.Documentation-exampleDetails {
margin-top: 1rem;
}
.Documentation-exampleDetailsBody pre {
border-radius: 0 0 0.3rem 0.3rem;
margin-bottom: 1rem;
margin-top: -0.25rem;
}
.Documentation-exampleDetailsBody textarea {
height: 100%;
outline: none;
overflow-x: auto;
resize: none;
white-space: pre;
width: 100%;
}
/**
* We add another selector here to these two classes to increase CSS specificity,
* the selector .Documentation pre + pre overrides .Documentation-exampleCode
* and .Documentation-exampleOutput by itself and would replace the styles.
*/
.Documentation-exampleDetailsBody .Documentation-exampleCode {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
margin: 0;
}
.Documentation-exampleDetailsBody .Documentation-exampleOutput {
border-top-left-radius: 0;
border-top-right-radius: 0;
margin: 0 0 0.5rem;
}
.Documentation-exampleDetailsHeader {
color: var(--color-brand-primary);
cursor: pointer;
margin-bottom: 2rem;
outline: none;
text-decoration: none;
}
.Documentation-exampleOutputLabel {
color: var(--color-text-subtle);
}
.Documentation-exampleError {
color: var(--pink);
margin-right: 0.4rem;
padding-right: 0.5rem;
}
/* See https://golang.org/issue/43368 for context. */
.Documentation-function pre,
.Documentation-typeFunc pre,
.Documentation-typeMethod pre {
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}
.Documentation-indexDeprecated {
margin-left: 0.5rem;
}
.Documentation-deprecatedBody {
color: var(--color-text-subtle);
font-size: 0.87rem;
font-weight: 400;
margin-left: 0.25rem;
margin-right: 0.5rem;
}
.Documentation-deprecatedTag {
background-color: var(--color-border);
border-radius: 0.125rem;
color: var(--color-text-inverted);
font-size: 0.75rem;
font-weight: normal;
line-height: 1.375;
padding: 0.125rem 0.25rem;
text-transform: uppercase;
vertical-align: middle;
}
.Documentation-deprecatedTitle {
align-items: center;
display: flex;
gap: 0.5rem;
}
.Documentation-deprecatedDetails {
color: var(--color-text-subtle);
}
.Documentation-deprecatedDetails a {
color: var(--color-text-subtle);
}
.Documentation-deprecatedDetails[open] {
color: var(--color-text);
}
.Documentation-deprecatedDetails[open] a {
color: var(--color-brand-primary);
}
.Documentation-deprecatedDetails .Documentation-deprecatedBody::after {
color: var(--color-brand-primary);
content: 'Show';
}
.Documentation-deprecatedDetails[open] .Documentation-deprecatedBody::after {
color: var(--color-brand-primary);
content: 'Hide';
}
.Documentation-deprecatedDetails > summary {
list-style: none;
opacity: 1;
}
.Documentation-deprecatedDetails .Documentation-source {
opacity: 1;
}
.Documentation-deprecatedItemBody {
padding: 1rem 1rem 0.5rem;
}
.Documentation-deprecatedMessage {
align-items: center;
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}