blob: 7d473272cd7d66b9caac2ff8fd3016384e7d9f49 [file] [log] [blame]
/*
* Copyright 2019-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.
*/
:root {
--gray-1: #202224;
--gray-2: #3e4042;
--gray-3: #555759;
--gray-4: #6e7072;
--gray-5: #848688;
--gray-6: #aaacae;
--gray-7: #c6c8ca;
--gray-8: #dcdee0;
--gray-9: #f0f1f2;
--gray-10: #fafafa;
--turq-light: #5dc9e2;
--turq-med: #00add8;
--turq-dark: #007d9c;
--blue: #bfeaf4;
--black: #000;
--green: #3a6e11;
--pink: #ce3262;
--purple: #542c7d;
--slate: #253443; /* Footer background. */
--white: #fff;
--yellow: #fddd00;
--yellow-light: #fff8cc;
--header-height: 3.5rem;
}
*,
:before,
:after {
box-sizing: border-box;
}
html,
body {
/**
* This is used to programatically detect whether overflow needs to be altered
* to prevent jitter when focusing within fixed elements on iOS.
* It also must be set to 'touch' for the fix to work.
*/
-webkit-overflow-scrolling: touch;
height: 100%;
}
body {
color: var(--gray-1);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji';
margin: 0;
}
button,
input,
select,
textarea {
font: inherit;
}
a,
a:link,
a:visited {
color: var(--turq-dark);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1,
h2,
h3,
h4,
h5,
h6 {
word-break: break-word;
}
h1,
h2,
h3 {
font-weight: 600;
}
h4,
h5,
h6 {
font-weight: 500;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.125rem;
}
h3 {
font-size: 1rem;
}
/**
* As header elements are not interactive, it’s okay to remove the visual
* indicator. https://css-tricks.com/focus-styles-non-interactive-elements/
*/
h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus {
outline: 0;
}
p {
font-size: 1rem;
line-height: 1.5rem;
}
.u-breakWord {
word-break: break-word;
}
code,
pre,
.Documentation textarea {
font-size: 1rem;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}
.Site {
display: flex;
flex-direction: column;
min-height: 100%;
}
.Site-content {
flex: 1;
margin-bottom: 5rem;
padding: 0 1rem;
}
.Site--redesign.Site--wide .Site-content {
padding: 0;
}
.Site-footer {
margin-top: 5rem;
}
@media only screen and (min-width: 57.7rem) {
.Site-content {
padding: 0 1.5rem;
}
.Site--redesign.Site--wide .Site-content {
padding: 0;
}
}
.Site-margin {
margin: auto;
max-width: 97rem;
width: 100%;
padding-left: 1rem;
padding-right: 1rem;
}
@media only screen and (min-width: 57.5rem) {
.Site-margin {
max-width: 98rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
}
}
.Banner {
/**
* Only show on wide viewports so the
* text never wraps or gets cut off.
*/
display: none;
background-color: var(--gray-1);
}
.Banner-inner {
align-items: center;
display: flex;
justify-content: space-between;
margin: 0 auto;
max-width: 75.75rem;
min-height: 2.5rem;
padding: 0.5rem 1.5rem;
}
.Site--wide .Banner-inner {
max-width: none;
}
.Site--redesign .Banner-inner {
max-width: 98rem;
}
.Banner-message {
color: #fff;
margin-right: 1.25rem;
}
.Banner-action:link,
.Banner-action:visited {
color: #fff;
text-decoration: underline;
white-space: nowrap;
}
@media only screen and (min-width: 52rem) {
.Banner {
display: block;
}
}
.Header {
margin: 0 auto;
max-width: 75.75rem;
}
.Site--wide .Header {
max-width: none;
}
.Site--redesign .Header {
max-width: 98rem;
}
.Site-header {
background: var(--turq-dark);
box-shadow: 0 0.0625rem 0.125rem rgba(171, 171, 171, 0.3);
width: 100%;
z-index: 1;
}
.Header-logoLink {
margin-right: auto;
}
.Header-nav {
align-items: center;
display: flex;
height: var(--header-height);
justify-content: space-between;
}
.Header-logo {
display: block;
height: 2rem;
margin: 0 2.25rem 0 1rem;
width: 5.125rem;
}
.Header-menu {
display: flex;
list-style: none;
height: 100%;
margin: 0;
padding: 0;
}
.Header-menuItem {
display: none;
}
@media only screen and (min-width: 57.7rem) {
.Header {
padding: 0 1.5rem;
}
.Header-logo {
margin-left: 1.4rem;
}
.Header-menuItem {
display: inline-flex;
flex: none;
}
.Header-menu {
justify-content: flex-end;
margin-left: 1.4rem;
}
.Header-navOpen {
display: none;
}
.Header-logo {
margin-left: 0;
}
}
.Header-menuItem a:link,
.Header-menuItem a:visited {
align-items: center;
border-bottom: 0.1875rem solid transparent;
border-top: 0.1875rem solid transparent; /* To ensure the text remains centered. */
color: var(--white);
display: inline-flex;
margin: 0 0.3125rem;
padding: 0 0.9375rem;
text-align: center;
text-decoration: none;
width: 100%;
}
.Header-menuItem--active a:link,
.Header-menuItem--active a:visited {
border-bottom-color: var(--turq-med);
font-weight: bold;
}
.Header-menuItem a:hover {
border-bottom-color: var(--white);
}
.Header-navOpen {
background: no-repeat center/2rem url('/static/legacy/img/menu-24px-white.svg');
border: none;
height: 2.5rem;
margin: auto 1rem;
width: 2.5rem;
}
.Header-searchForm {
align-items: center;
background-color: transparent;
border: 0.0625rem solid transparent;
border-radius: 0.25rem;
display: flex;
font-size: 1rem;
height: 2rem;
position: relative;
width: 2.25rem;
}
.Header-searchForm:focus-within {
background-color: var(--white);
border-color: var(--gray-8);
flex: 1;
left: 1rem;
position: absolute;
width: calc(100% - 5.25rem);
}
.Header-searchFormInput {
background-color: transparent;
border: none;
box-sizing: border-box;
color: transparent;
flex: 1;
height: 100%;
outline: none;
position: absolute;
width: 100%;
}
.Header-searchFormInput::placeholder {
color: transparent;
}
.Header-searchForm:focus-within .Header-searchFormInput {
color: var(--gray-1);
height: auto;
position: relative;
width: auto;
}
.Header-searchForm:focus-within .Header-searchFormInput::placeholder {
color: var(--gray-4);
}
.Header-searchFormSubmit {
background-color: transparent;
border: none;
box-sizing: border-box;
cursor: pointer;
display: flex;
}
.Header-searchFormSubmitIcon {
box-sizing: border-box;
cursor: pointer;
fill: var(--white);
width: 1.4375rem;
}
.Header-searchForm:focus-within .Header-searchFormSubmitIcon {
fill: var(--gray-4);
}
@media only screen and (min-width: 26.875rem) {
.Header-searchForm {
background-color: var(--white);
border-color: var(--gray-8);
flex: 1;
width: auto;
}
.Header-searchForm:focus-within {
left: 0;
position: relative;
width: auto;
}
.Header-searchFormSubmitIcon {
fill: var(--gray-4);
}
.Header-searchFormInput {
color: var(--gray-1);
height: auto;
position: relative;
width: auto;
}
.Header-searchFormInput::placeholder {
color: var(--gray-4);
}
}
.NavigationDrawer {
background: var(--white);
display: none;
height: 100%;
left: auto;
max-width: 27rem;
position: fixed;
right: 0;
top: 0;
width: 85%;
z-index: 10;
}
.NavigationDrawer.is-active {
display: initial;
}
.NavigationDrawer-header {
display: flex;
justify-content: space-between;
}
.NavigationDrawer-logo {
display: block;
height: 2rem;
margin: 1rem 1rem;
width: 5.125rem;
}
.NavigationDrawer-close {
background: no-repeat center/2rem url('/static/legacy/img/close-24px.svg');
border: none;
height: 2.5rem;
margin: auto 1rem;
width: 2.5rem;
}
.NavigationDrawer-list {
list-style: none;
margin: 0;
padding: 0;
}
.NavigationDrawer-listItem {
font-size: 1.5rem;
margin: 0 0.5rem;
}
.NavigationDrawer-listItem a:link,
.NavigationDrawer-listItem a:visited {
display: block;
margin: 0 1rem;
padding: 1rem;
}
.NavigationDrawer-listItem--active {
background-color: var(--gray-8);
border-radius: 0.4rem;
}
.NavigationDrawer-scrim {
display: none;
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 5;
}
.NavigationDrawer.is-active + .NavigationDrawer-scrim {
background-color: rgba(0, 0, 0, 0.32);
display: block;
}
.DetailsHeader-badge {
border-radius: 1rem;
display: inline-block;
font-size: 0.75rem;
padding: 0.25rem 0.75rem;
position: relative;
top: -0.125rem;
}
.DetailsHeader-badge--latest {
background: var(--turq-dark);
}
.DetailsHeader-badge--latest a {
display: none;
}
.DetailsHeader-badge--latest span.DetailsHeader-span--notAtLatest {
display: none;
}
.Error-gopher,
.EmptyContent-gopher,
.Fetch-gopher,
.SearchResults-emptyContentGopher {
display: block;
margin: auto;
max-width: 15rem;
padding: 1.25rem 0;
}
.Error-message,
.EmptyContent-message,
.SearchResults-emptyContentMessage {
text-align: center;
}
.Error-gopher,
.EmptyContent-gopher,
.NotFound-gopher,
.SearchResults-emptyContentGopher {
display: block;
height: 15rem;
margin: auto;
padding: 1.25rem 0;
width: 15rem;
}
.Error-message,
.EmptyContent-message,
.SearchResults-emptyContentMessage {
text-align: center;
}
.CopyToClipboardButton {
background-color: transparent;
border: none;
cursor: pointer;
height: 1.5rem;
margin: 0 0.5rem;
position: relative;
}
.CopyToClipboardButton:not([data-tooltip])::before,
.CopyToClipboardButton:not([data-tooltip])::after,
.CopyToClipboardButton[data-tooltip='']::before,
.CopyToClipboardButton[data-tooltip='']::after {
display: none;
}
.CopyToClipboardButton::before {
background-color: rgba(0, 0, 0, 0.75);
border-radius: 3px;
color: var(--white);
content: attr(data-tooltip);
display: block;
font-size: 0.9em;
left: calc(100% + 0.125rem);
position: absolute;
padding: 0.25rem 0.3rem;
text-transform: uppercase;
top: 2px;
white-space: nowrap;
z-index: 1000;
}
.CopyToClipboardButton::after {
border-bottom: 0.25rem solid transparent;
border-left: 0;
border-right: 0.25rem solid rgba(0, 0, 0, 0.75);
border-top: 0.25rem solid transparent;
content: '';
display: block;
position: absolute;
right: -0.125rem;
top: 9px;
z-index: 1000;
}
.CopyToClipboardButton:hover {
background-color: var(--gray-9);
}
.CopyToClipboardButton:active {
background-color: var(--gray-8);
}
.CopyToClipboardButton-image {
display: block;
height: 0.9375rem;
}
.Container {
color: var(--gray-1);
flex-grow: 1;
margin: 0 auto;
max-width: 60em;
position: relative;
}
.Site--wide .Container {
max-width: none;
}
.Content {
min-height: 32rem;
margin: 0 auto;
max-width: 60em;
padding: 2rem 0;
}
.Content-header {
margin: 0;
font-size: 1.875rem;
}
.Content h2 {
margin: 0;
}
.Content p {
color: var(--gray-3);
}
.Dialog {
padding: 0;
position: fixed;
border: 0.0625rem solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.5);
top: 50%;
transform: translate(0, -50%);
}
.Dialog-title {
font-size: 1.125rem;
padding: 0 0.8rem;
}
.Dialog-actions {
text-align: right;
padding: 0.8rem;
}
.Dialog-button {
background: none;
border-radius: 0.625rem;
border: 0.0625rem solid var(--gray-8);
color: var(--turq-dark);
font-size: 1rem;
max-width: 6.25rem;
padding: 0.625rem;
text-align: center;
}
/* Used in search bar */
.ImageButton {
border: none;
border-radius: 0.2rem;
cursor: pointer;
background-color: transparent;
padding: 0.2rem 0.375rem;
background-color: transparent;
display: inline-flex;
}
.ImageButton:hover {
background-color: var(--gray-9);
}
.ImageButton:active {
background-color: var(--gray-8);
}
.Site-footer {
background-color: var(--slate);
color: var(--white);
font-size: 0.875rem;
}
.Footer-links {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: auto;
max-width: 75.75rem;
padding: 2rem 1.5rem 2.625rem 1.5rem;
}
.Footer-linkColumn {
flex: 0 0 9.5rem;
}
a.Footer-link {
color: var(--white);
display: flex;
flex: 1;
font-size: 0.875rem;
line-height: 2rem;
}
a.Footer-link--primary {
font-size: 1.125rem;
line-height: 1.75rem;
margin-bottom: 0.5rem;
margin-top: 0.75rem;
}
.Footer-bottom {
align-items: center;
border-top: 0.0625rem solid var(--gray-8);
display: flex;
margin: 0 1.5rem;
min-height: 4.125rem;
}
.Footer-gopher {
align-self: flex-end;
height: 3.147rem;
width: 5rem;
}
.Footer-listRow {
display: flex;
flex: 1;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
.Footer-listItem {
align-items: center;
display: flex;
flex: 1 100%;
justify-content: center;
margin: 0.4rem 0;
padding: 0 1rem;
}
.Footer-listItem a:link,
.Footer-listItem a:visited {
color: var(--white);
}
@media only screen and (min-width: 52rem) {
.Footer-listItem {
flex: initial;
}
.Footer-listItem + .Footer-listItem {
border-left: 0.0625rem solid var(--gray-7);
}
}
.Footer-googleLogo {
align-self: flex-end;
height: 1.5rem;
margin-bottom: 1.3rem;
text-align: right;
}
.Footer-googleLogoImg {
height: 1.5rem;
width: 4.529rem;
}
.Container--fullBleed {
margin: 0;
max-width: none;
}