Skip to content

Commit

Permalink
Sticky header
Browse files Browse the repository at this point in the history
  • Loading branch information
jokd committed Nov 24, 2023
1 parent cc45e70 commit 9d8d1fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scss/ui/_slidenav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
box-sizing: border-box;
display: inline-block;
line-height: 0;
overflow: hidden;
position: relative;
transition: height 0.3s;

>.main {
box-sizing: border-box;
display: inline-block;
left: 0;
overflow: hidden;
position: relative;
top: 0;
transition: all 0.3s;
Expand Down Expand Up @@ -70,5 +68,7 @@
opacity: 1;
transform: none;
}

overflow: hidden
}
}
4 changes: 4 additions & 0 deletions scss/ui/helpers/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
overflow-y: auto;
}

.overflow-unset {
overflow: unset;
}

// position
.absolute {
position: absolute;
Expand Down
3 changes: 2 additions & 1 deletion src/controls/legend/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ const Group = function Group(viewer, options = {}) {

const GroupHeader = function GroupHeader() {
const headerComponent = CollapseHeader({
cls: 'hover padding-x padding-y-small grey-lightest border-bottom text-small',
cls: 'hover padding-x padding-y-small grey-lightest border-bottom text-small sticky bg-white z-index-low',
style: 'top: 0;',
icon,
title
});
Expand Down
2 changes: 1 addition & 1 deletion src/ui/slidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function Slidenav(options = {}) {
getState,
onInit() {
mainContainer = Element({
cls: 'main'
cls: 'main overflow-unset'
});
backButton = Button({
cls: 'icon-small padding-small',
Expand Down

0 comments on commit 9d8d1fa

Please sign in to comment.