feat(sidebar): prevent sidebar from moving on page scroll

This commit is contained in:
Jimmy Cai 2020-09-03 23:37:48 +02:00
parent bbe7e4b73d
commit be6fcfb526
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18
2 changed files with 11 additions and 15 deletions

View File

@ -19,14 +19,15 @@
} }
&.sticky { &.sticky {
top: 30px; top: 0;
} }
@media (min-width: $on-phone + 1) { @media (min-width: $on-phone + 1) {
width: 25%; width: 25%;
margin-right: 1%; margin-right: 1%;
padding-top: 50px;
} }
@media (min-width: $on-desktop) { @media (min-width: $on-desktop) {
width: 20%; width: 20%;
} }

View File

@ -47,9 +47,14 @@ a {
} }
} }
#content { main.main {
@media (min-width: $on-phone) { min-width: 0;
padding-top: 30px; padding: 0 15px;
max-width: 100%;
flex-grow: 1;
@media (min-width: $on-phone + 1) {
padding-top: 15px;
} }
@media (min-width: $on-tablet) { @media (min-width: $on-tablet) {
@ -57,16 +62,6 @@ a {
} }
} }
main.main {
min-width: 0;
padding: 0 15px;
max-width: 100%;
@media (min-width: $on-phone + 1) {
padding: 0 15px;
}
flex-grow: 1;
}
.main-grid { .main-grid {
@media (max-width: $on-phone) { @media (max-width: $on-phone) {
flex-direction: column; flex-direction: column;