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 */
3 years ago
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 > *{
3 years ago
box-sizing: border-box;
}
3 years ago
body > section.grid-display > .column-fixed > *{
position: sticky;
top: calc(var(--lh) * 4);
}
3 years ago
body.all-typo > section.grid-display{
grid-template-columns: 1fr !important;
}
3 years ago
.all-typo .column-scroll{
display: none;
}
/* RESPONSIVE
=========================================================================== */
3 years ago
/* 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{
3 years ago
grid-template-columns: 1fr !important;
}
3 years ago
/* remove column containers */
section.grid-display > div{
display: contents;
}
3 years ago
/* remove sticky */
body > section.grid-display > .column-fixed > *{
position: relative;
top: 0;
}
/* calendar */
body.calendar #moon-watch-section{
order: 0;
}
3 years ago
body.calendar #about-section{
order: 1;
}
3 years ago
body.calendar #calendar-section{
order: 2;
}
3 years ago
}
3 years ago
/* mobile */
@media only screen and (max-width: 680px) {
/* one column when smaller */
:root{
--fs-display: clamp(3rem, 16vw, 6rem);
}
3 years ago
body > section.grid-display{
grid-template-columns: 1fr !important;
padding: var(--lh) calc(var(--lh) * 0.5);
}
}