FIX: Don't outline buttons when menu is in slide out

This commit is contained in:
Robin Ward 2015-08-31 15:30:51 -04:00
parent 989c915a02
commit e2b7b2f2cf
2 changed files with 26 additions and 21 deletions

View File

@ -37,11 +37,13 @@ export default Ember.Component.extend({
contentHeight = fullHeight - (offsetTop - scrollTop) - PANEL_BODY_MARGIN;
}
$panelBody.height(contentHeight);
$('body').addClass('drop-down-visible');
} else {
$panelBody.height('auto');
const $header = $('header.d-header');
const headerHeight = parseInt($header.height() + $header.offset().top - $(window).scrollTop() + 3);
this.$().css({ left: "auto", top: headerHeight + "px" });
$('body').removeClass('drop-down-visible');
}
},
@ -76,6 +78,7 @@ export default Ember.Component.extend({
$('html').off('click.close-menu-panel');
$(window).off('scroll.discourse-menu-panel');
this._stopWatchingSize();
$('body').removeClass('drop-down-visible');
}
},

View File

@ -82,27 +82,29 @@
background-color: dark-light-diff($primary, $secondary, 90%, -60%);
}
}
.active .icon {
position: relative;
color: #7b7b7b;
background-color: $secondary;
cursor: default;
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-left: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-right: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
&:after {
display: block;
position: absolute;
top: 100%;
left: 0;
z-index: 1101;
width: 100%;
height: 0;
content: "";
border-top: 1px solid $secondary;
}
&:hover {
border-bottom: none;
.drop-down-visible & {
.active .icon {
position: relative;
color: #7b7b7b;
background-color: $secondary;
cursor: default;
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-left: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-right: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
&:after {
display: block;
position: absolute;
top: 100%;
left: 0;
z-index: 1101;
width: 100%;
height: 0;
content: "";
border-top: 1px solid $secondary;
}
&:hover {
border-bottom: none;
}
}
}
[class^="fa fa-"] {