blob: cf4817d3bbe324904a9f1261a1aa3e6cc328bcf3 [file] [log] [blame]
/*!
* Copyright 2021 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.
*/
/**
* Typography should be imported first to ensure expected CSS
* inheritance on text elements.
*/
@import url('../_typography/typography.css');
@import url('../_button/button.css');
@import url('../_breadcrumb/breadcrumb.css');
@import url('../_chip/chip.css');
@import url('../_clipboard/clipboard.css');
@import url('../_color/color.css');
@import url('../_footer/footer.css');
@import url('../_form/form.css');
@import url('../_gopher/gopher.css');
@import url('../_header/header.css');
@import url('../_icon/icon.css');
@import url('../_message/message.css');
@import url('../_modal/modal.css');
@import url('../_outline/tree.css');
@import url('../_tooltip/tooltip.css');
:root {
/* Padding at the left and right of the viewport. */
--gutter: 1rem;
/* Margin between containers in the grid layout. */
--gap: 1rem;
/* The margin placed above elements scrolled to by clicking hash links. */
--scroll-margin: calc(
var(--js-sticky-header-height, 3.5rem) + var(--js-sticky-nav-height, 0) + 2rem
);
/* Default styles for page elements. */
--border: 0.0625rem solid var(--color-border);
--border-radius: 0.25rem;
--box-shadow: 0 0 0.375rem 0 rgb(0 0 0 / 25%);
--focus-box-shadow: 0 0 0.0625rem 0.0625rem rgba(0, 112, 210, 0.6);
}
[data-theme='dark'] :root {
--box-shadow: 0 0.3125rem 0.9375rem rgb(0 0 0 / 45%);
}
@media (min-width: 50rem) {
:root {
--gutter: 1.5rem;
--gap: 2rem;
--scroll-margin: calc(
var(--js-sticky-header-height, 3.5rem) + var(--js-sticky-nav-height, 0) + 1rem
);
}
}
@media (min-width: 80rem) {
:root {
--gutter: 2rem;
}
}
@media (min-width: 112rem) {
:root {
--gutter: 2.5rem;
}
}
*:target {
scroll-margin-top: var(--scroll-margin);
}
body {
background-color: var(--color-background);
display: flex;
flex-direction: column;
min-height: 100vh;
min-width: 23.5rem;
/**
* 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;
overscroll-behavior: none;
}
.go-Container {
display: flex;
flex-grow: 1;
height: 100%;
margin-bottom: 5rem;
}
.go-Content {
display: flex;
flex-flow: column;
gap: 1rem;
margin: 0 auto;
max-width: 63rem;
min-height: 32rem;
padding: 2rem var(--gutter);
width: 100%;
}
.go-Content--center {
margin: auto;
}