Skip to content

Commit

Permalink
feat(design): use position fixed on sidebar nav
Browse files Browse the repository at this point in the history
  • Loading branch information
damienwebdev committed Aug 6, 2023
1 parent 42ca952 commit 1839a85
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(backdropClicked)="_backdropClicked()"></daff-backdrop>

<div class="daff-sidebar-viewport__content" [@transformContent]="_animationState">
<ng-content select="[daff-sidebar-viewport-nav]"></ng-content>
<div class="daff-sidebar-viewport__nav"><ng-content select="[daff-sidebar-viewport-nav]"></ng-content></div>
<div class="daff-sidebar-viewport__inner" [style.padding-left.px]="_contentPadLeft" [style.padding-right.px]="_contentPadRight">
<ng-content></ng-content>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
&__content {
flex: 0 1 auto;
width: 100%;
will-change: transform;
z-index: variables.$daff-sidebar-content-z-index;
overflow-y: auto;
height: 100%;
Expand All @@ -28,6 +27,23 @@
flex-shrink: 0;
}

&__nav {
position: fixed;
top: 0;
width: 100%;
z-index: variables.$daff-sidebar-content-z-index;

&:empty {
display: none;
}

&:not(:empty) {
+ #{$root}__inner {
margin-top: var(--daff-sidebar-side-fixed-top-shift);
}
}
}

&__backdrop {
height: 100%;
position: absolute;
Expand Down

0 comments on commit 1839a85

Please sign in to comment.