Skip to content

Commit

Permalink
remove admin bar box-shadow on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Winkelman committed May 2, 2017
1 parent bc021d0 commit 478c4e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
13 changes: 0 additions & 13 deletions assets/js/theme/global/maintenanceMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@ export default function (maintenanceMode = {}) {
$('body').prepend($element);

$('.adminBar-content a').click(attachThemeEditorParams);

$(window).scroll(() => {
const $topBarContainer = $('.adminBar');
const scrollTop = $(window).scrollTop();

if (scrollTop > 15) {
if (!$topBarContainer.hasClass('adminBar--scroll')) {
$topBarContainer.addClass('adminBar--scroll');
}
} else if (scrollTop === 0) {
$topBarContainer.removeClass('adminBar--scroll');
}
});
} else {
const $element = $('<div>', {
id: 'maintenance-notice',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ body.hasAdminBar {

.adminBar {
background-color: $adminBar-color;
box-shadow: 0 remCalc(2) remCalc(7) 0 rgba(0, 0, 0, 0.2);
color: $adminBar-text-color;
float: left;
font-family: "Source Sans Pro", arial, "sans serif", sans-serif;
Expand All @@ -69,11 +70,6 @@ body.hasAdminBar {
top: 0;
width: 100%;
z-index: 10000;

&.adminBar--scroll {
box-shadow: 0 remCalc(2) remCalc(7) 0 rgba(0, 0, 0, 0.2);
transition: all 0.2s ease-in;
}
}

.adminBar-logo {
Expand Down

0 comments on commit 478c4e7

Please sign in to comment.