U4-10962 - Disable stickyheader when nested, fix margins when disabled

This commit is contained in:
Dennis Öhman
2018-02-11 16:58:46 +01:00
parent 6c328d729d
commit ebae69d00c
2 changed files with 19 additions and 8 deletions

View File

@@ -50,6 +50,11 @@ Use this directive make an element sticky and follow the page when scrolling.
function activate() {
if (bar.parents(".umb-property").length > 1) {
bar.addClass("nested");
return;
}
if (attr.scrollableContainer) {
scrollableContainer = $(attr.scrollableContainer);
} else {

View File

@@ -1,12 +1,18 @@
.umb-editor-sub-header {
padding: 15px 0;
margin-bottom: 30px;
background: @white;
display: flex;
justify-content: space-between;
margin-top: -30px;
position: relative;
top: 0;
padding: 15px 0;
margin-bottom: 30px;
background: @white;
display: flex;
justify-content: space-between;
margin-top: -30px;
position: relative;
top: 0;
&.nested {
margin-top: 0;
margin-bottom: 0;
background: @gray-10;
}
}
.umb-editor-sub-header.-umb-sticky-bar {