Skip to content

Commit

Permalink
fix(sidebar): incorrect offset and z-index on mobile
Browse files Browse the repository at this point in the history
fixes #8646
fixes #8702
  • Loading branch information
LeoMcA committed May 15, 2023
1 parent 80094ea commit c448c85
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
16 changes: 9 additions & 7 deletions client/src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,18 @@
--article-actions-container-height: 2rem;
--icon-size: 1rem;
--sticky-header-height: calc(
var(--top-nav-height) + var(--article-actions-container-height) + 2px
var(--top-nav-height) + var(--article-actions-container-height) + 3px
);
}

.top-banner.visible ~ *,
.top-banner.loading ~ * {
--sticky-header-height: calc(
var(--top-nav-height) + var(--article-actions-container-height) +
var(--top-banner-outer-height) + 2px
);
@media screen and (min-width: $screen-md) {
.top-banner.visible ~ *,
.top-banner.loading ~ * {
--sticky-header-height: calc(
var(--top-nav-height) + var(--article-actions-container-height) +
var(--top-banner-outer-height) + 2px
);
}
}

@media screen and (min-width: $screen-md) {
Expand Down
6 changes: 6 additions & 0 deletions client/src/document/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,15 @@ kbd {
display: flex;
flex-direction: column;
}

max-height: var(--max-height);
position: sticky;
top: var(--offset);
z-index: var(--z-index-top);

@media screen and (min-width: $screen-md) {
z-index: auto;

.sidebar {
mask-image: linear-gradient(
to bottom,
Expand All @@ -657,6 +662,7 @@ kbd {
rgba(0, 0, 0, 0) 100%
);
}

@media screen and not (min-height: $screen-height-place-limit) {
overflow: auto;
}
Expand Down

0 comments on commit c448c85

Please sign in to comment.