You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.6 KiB
CSS

/* we have fixed element but the only scroll is on the body,
so scrolling anywhere on the page works */
body > header{
position: sticky;
top: 0;
z-index: 2;
}
body > section.grid-display{
display: grid;
grid-template-columns: 1fr 60%;
padding: var(--lh) var(--lh) 0;
gap: 0 calc(var(--lh) * 2);
box-sizing: content-box;
position: relative;
}
body > section.grid-display > *{
box-sizing: border-box;
}
body > section.grid-display > .column-fixed > *{
position: sticky;
top: calc(var(--lh) * 4);
}
body.all-typo > section.grid-display{
grid-template-columns: 1fr !important;
}
.all-typo .column-scroll{
display: none;
}
/* RESPONSIVE
=========================================================================== */
/* one column break */
@media only screen and (max-width: 1050px) {
/* one column when smaller */
:root{
--fs-display: clamp(3rem, 16vw, 6rem);
}
body > section.grid-display{
grid-template-columns: 1fr !important;
}
/* remove column containers */
section.grid-display > div{
display: contents;
}
/* remove sticky */
body > section.grid-display > .column-fixed > *{
position: relative;
top: 0;
}
/* calendar */
body.calendar #moon-watch-section{
order: 0;
}
body.calendar #about-section{
order: 1;
}
body.calendar #calendar-section{
order: 2;
}
}
/* mobile */
@media only screen and (max-width: 680px) {
/* one column when smaller */
:root{
--fs-display: clamp(3rem, 16vw, 6rem);
}
body > section.grid-display{
grid-template-columns: 1fr !important;
padding: var(--lh) calc(var(--lh) * 0.5);
}
}