Merge pull request #3 from dasvh/fixedSidebarTest

table of content is now in a fixed position when you scroll the page
This commit is contained in:
dasvh 2023-05-05 17:26:38 +02:00 committed by GitHub
commit d2fa839098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,10 +4,10 @@
max-width: 64rem; max-width: 64rem;
margin: 1rem auto; margin: 1rem auto;
display: grid; display: grid;
grid-template-areas: grid-template-areas:
"header" "header"
"body" "body"
"aside" "aside"
"footer"; "footer";
grid-template-columns: minmax(0, 1fr); /* https://css-tricks.com/preventing-a-grid-blowout/ */ grid-template-columns: minmax(0, 1fr); /* https://css-tricks.com/preventing-a-grid-blowout/ */
grid-row-gap: 2rem; grid-row-gap: 2rem;
@ -49,6 +49,10 @@
.page__aside { .page__aside {
grid-area: aside; grid-area: aside;
color: var(--off-fg); color: var(--off-fg);
position: fixed;
top: 5rem;
right: 28rem;
width: 15rem;
} }
/* Footer */ /* Footer */