[Sidebar] Resolve sidebar moving on scroll#965
[Sidebar] Resolve sidebar moving on scroll#965Bharath314 wants to merge 2 commits intolayer5io:masterfrom
Conversation
Signed-off-by: Bharath Valaboju <69413757+Bharath314@users.noreply.github.com>
|
🚀 Preview deployment: https://layer5io.github.io/docs/pr-preview/pr-965/
|
There was a problem hiding this comment.
Code Review
This pull request modifies the sidebar styling in assets/scss/_styles_project.scss by adding a new inner element and refining media queries for sticky positioning. The review feedback identifies several redundant CSS properties, such as default values for order and position, and unnecessary overflow rules that should be removed to simplify the styles.
| order: 0; | ||
|
|
||
| @include media-breakpoint-up(md) { | ||
| @supports (position: sticky) { | ||
| position: static; | ||
| top: 0; | ||
| z-index: 10; | ||
| } | ||
| } |
There was a problem hiding this comment.
The properties in this block are redundant or ineffective:
order: 0is the default value for flex items.position: staticis the default position, andtop: 0is ignored on static elements.z-index: 10on a static element does not affect stacking relative to elements outside the parent container.
If the goal is to ensure the sidebar stays on top of other page elements (like the footer which has z-index: 5), consider applying z-index to the sticky .td-sidebar container instead.
| $_max-height: none; | ||
| overflow: hidden; | ||
| padding: 0px; | ||
|
|
||
| @include media-breakpoint-up(md) { | ||
| @supports (position: sticky) { | ||
| max-height: $_max-height; | ||
| overflow-y: hidden; | ||
| } | ||
| } |
Signed-off-by: Bharath Valaboju <69413757+Bharath314@users.noreply.github.com>
Notes for Reviewers
This PR fixes #468.
2026-04-28.13-23-50.mp4
Signed commits