Improve responsiveness of sidebar
This commit is contained in:
parent
6e5fc8b952
commit
76e18bb922
2 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="./index.scss" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="hero" id="hero">
|
||||
|
|
|
@ -48,6 +48,7 @@ $details-padding: $content-padding;
|
|||
|
||||
main {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
|
@ -72,7 +73,6 @@ main {
|
|||
|
||||
.bleed {
|
||||
grid-column: 1 / -1;
|
||||
max-width: 100vw;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,8 @@ main {
|
|||
flex-grow: 1;
|
||||
flex-shrink: 10;
|
||||
flex-basis: 200px;
|
||||
min-width: 400px;
|
||||
background-color: orange;
|
||||
|
||||
.sidebar-inner {
|
||||
position: sticky;
|
||||
|
@ -105,9 +107,17 @@ main {
|
|||
|
||||
.sidebar {
|
||||
flex-basis: unset;
|
||||
width: $content-width;
|
||||
max-width: 100vw;
|
||||
|
||||
.sidebar-inner {
|
||||
position: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue