Makes version selector sticky (#2492)

* Makes version selector sticky

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Adds min width to site nav to accommodate version selector

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Makes site nav 100% vh

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
This commit is contained in:
kolchfa-aws 2023-01-26 11:15:34 -05:00 committed by GitHub
parent 8565bb2adf
commit 84da2cf812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -48,11 +48,12 @@ code {
}
.site-nav {
padding-top: 1rem;
padding-top: 0;
position: sticky;
top: 1rem;
max-height: calc(100vh - 2rem);
top: 0;
max-height: 100vh;
overflow-x: hidden;
min-width: 14rem;
}
.nav-category {
@ -1251,12 +1252,17 @@ main {
.version-wrapper {
text-align: center;
margin-bottom: 1rem;
position: sticky;
top: 0;
z-index: 9999999;
background-color: $sidebar-color;
}
version-selector {
z-index: 1;
font-size: .9rem;
padding-top: 1rem;
padding-bottom: 1rem;
--normal-bg: linear-gradient(#{lighten($blue-300, 5%)}, #{darken($blue-300, 2%)});
--hover-bg: linear-gradient(#{lighten($blue-300, 2%)}, #{darken($blue-300, 4%)});