2022-12-11 23:45:43 +00:00
|
|
|
/* [responsive] more room to breathe above mobile sizes */
|
|
|
|
|
2022-12-11 23:47:16 +00:00
|
|
|
@media (min-width: 30rem) {
|
2022-12-11 23:45:43 +00:00
|
|
|
.container {
|
|
|
|
padding: 0 2em;
|
|
|
|
}
|
2022-12-11 23:47:16 +00:00
|
|
|
}
|
2022-12-11 23:45:43 +00:00
|
|
|
|
2022-10-13 10:49:41 +00:00
|
|
|
/* [responsive] re-show the navigation menu as a sidebar */
|
|
|
|
|
|
|
|
@media (min-width: 60rem) {
|
|
|
|
body {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 3fr;
|
2022-12-18 14:10:54 +00:00
|
|
|
grid-template-rows: auto 0 1fr auto;
|
2022-10-13 10:49:41 +00:00
|
|
|
height: calc(100 * var(--vh, 1vh));
|
|
|
|
}
|
|
|
|
.site-header, .scroll-margin, .site-footer {
|
|
|
|
grid-column: span 2
|
|
|
|
}
|
2022-10-16 22:15:34 +00:00
|
|
|
|
2022-10-13 10:49:41 +00:00
|
|
|
.docs-nav {
|
|
|
|
grid-column: 1;
|
|
|
|
overflow-y: auto;
|
|
|
|
padding: 0;
|
2022-12-18 14:10:54 +00:00
|
|
|
min-width: 20rem;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
2022-12-18 14:10:54 +00:00
|
|
|
|
2022-10-13 10:49:41 +00:00
|
|
|
main {
|
|
|
|
grid-column: 2;
|
|
|
|
overflow-y: auto;
|
|
|
|
scrollbar-width: none;
|
|
|
|
}
|
|
|
|
.docs-nav::-webkit-scrollbar,
|
|
|
|
main::-webkit-scrollbar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-12-18 14:10:54 +00:00
|
|
|
.docs-nav .menu {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
2022-10-13 10:49:41 +00:00
|
|
|
|
|
|
|
.page-header {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* toggle is no longer needed */
|
|
|
|
|
|
|
|
.toggle-menu {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.toggle-menu:not(:checked) ~ .menu {
|
2022-12-18 14:10:54 +00:00
|
|
|
display: flex;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
.toggle-menu__label {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-12-18 14:10:54 +00:00
|
|
|
.docs-nav, .page-header {padding: 2rem 0;}
|
2022-10-18 01:04:22 +00:00
|
|
|
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* [responsive] move the toc to its own column */
|
|
|
|
|
|
|
|
@media (min-width: 75rem) {
|
|
|
|
body {
|
2022-12-18 14:10:54 +00:00
|
|
|
grid-template-columns: auto 1fr;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
.page {
|
|
|
|
display: grid;
|
2022-12-18 14:10:54 +00:00
|
|
|
grid-template-columns: 1fr minmax(auto,20rem);
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
2022-10-18 01:04:22 +00:00
|
|
|
.page-header,
|
|
|
|
.content,
|
|
|
|
.section-nav,
|
|
|
|
.page-footer
|
|
|
|
{
|
2022-10-13 10:49:41 +00:00
|
|
|
grid-column: 1;
|
|
|
|
}
|
2022-10-18 01:04:22 +00:00
|
|
|
.toc {
|
2022-10-13 10:49:41 +00:00
|
|
|
grid-column: 2;
|
2022-10-18 01:04:22 +00:00
|
|
|
grid-row: span 4;
|
2022-10-13 10:49:41 +00:00
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
.page .toc .container {
|
|
|
|
margin: 0;
|
2022-10-14 02:40:13 +00:00
|
|
|
position: sticky;
|
2022-12-18 14:10:54 +00:00
|
|
|
top: 2rem;
|
2022-10-13 10:49:41 +00:00
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* start limiting content since it can exceed 80ch now */
|
|
|
|
|
2022-10-16 22:15:34 +00:00
|
|
|
.content .container
|
|
|
|
{
|
2022-10-13 10:49:41 +00:00
|
|
|
display: grid;
|
2022-10-18 01:04:22 +00:00
|
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 80ch) minmax(0, 1fr);
|
2022-10-13 10:49:41 +00:00
|
|
|
> * {
|
|
|
|
grid-column: 2;
|
|
|
|
}
|
|
|
|
> img
|
|
|
|
{
|
|
|
|
grid-column: 1 / span 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-17 14:46:58 +00:00
|
|
|
.page-header,
|
2022-10-17 23:59:53 +00:00
|
|
|
.list,
|
|
|
|
.section-nav,
|
|
|
|
.page-footer
|
2022-10-17 14:46:58 +00:00
|
|
|
{
|
2022-10-13 10:49:41 +00:00
|
|
|
display: grid;
|
2022-10-18 01:04:22 +00:00
|
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 80ch) minmax(0, 1fr);
|
2022-12-18 14:10:54 +00:00
|
|
|
padding: 0 2rem;
|
2022-10-13 10:49:41 +00:00
|
|
|
> .container {
|
2022-10-17 23:59:53 +00:00
|
|
|
grid-column: 2;
|
2022-10-18 01:04:22 +00:00
|
|
|
padding: 0;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-18 01:04:22 +00:00
|
|
|
.page-header {
|
2022-12-18 14:10:54 +00:00
|
|
|
padding-top: 2rem;
|
2022-10-18 01:04:22 +00:00
|
|
|
}
|
|
|
|
.page-footer {
|
|
|
|
padding-bottom: 1rem;
|
|
|
|
}
|
|
|
|
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
2022-10-18 01:04:22 +00:00
|
|
|
@media (min-width: 80rem) {
|
|
|
|
.page {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr 20rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-10-14 02:40:13 +00:00
|
|
|
/* [responsive] fixed layout after reaching maxwidth */
|
2022-10-13 10:49:41 +00:00
|
|
|
|
2022-10-14 02:40:13 +00:00
|
|
|
@media (min-width: $site-max-width) {
|
2022-10-13 10:49:41 +00:00
|
|
|
|
|
|
|
body {
|
2022-10-14 02:40:13 +00:00
|
|
|
grid-template-columns: 1fr 20rem calc(var(--site-max-width) - 20rem) 1fr
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
2022-10-14 02:40:13 +00:00
|
|
|
.docs-nav {grid-column: 2;}
|
|
|
|
main {grid-column: 3;}
|
2022-10-13 10:49:41 +00:00
|
|
|
.site-header,
|
2022-10-14 02:40:13 +00:00
|
|
|
.site-footer,
|
|
|
|
.scroll-margin
|
2022-10-13 10:49:41 +00:00
|
|
|
{
|
2022-12-18 14:10:54 +00:00
|
|
|
grid-column: 1 / span 4;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* except now the page is fixed to maxwidth and the toc can "grow" */
|
|
|
|
|
|
|
|
.page {
|
2022-10-14 02:40:13 +00:00
|
|
|
grid-template-columns: calc(var(--site-max-width) - 40rem) 1fr;
|
2022-10-13 10:49:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* we don't actually want it to grow, though! just stick to the side */
|
|
|
|
|
|
|
|
.page {position: relative;}
|
|
|
|
.page .toc {
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* also the menu sidebar should stick to the other side */
|
|
|
|
.docs-nav {
|
|
|
|
position: sticky;
|
|
|
|
width: 20rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|