Skip to content

Commit

Permalink
MWPW-138565 | Gnav overlapping with popup promobar (adobecom#1519)
Browse files Browse the repository at this point in the history
Popup promobar takes a 16px gap from the bottom to have a floating effect. The current bottom attribute is making the promobar overlap with the Gnav.
Changing the bottom attribute and applying it on section so that the promobar does not overlap with gnav when previewed in fragment.

Sample page links -
https://mwpw-138565--milo--aishwaryamathuria.hlx.page/drafts/mathuria/promobar/creativecloud
https://mwpw-138565--milo--aishwaryamathuria.hlx.page/drafts/mathuria/promobar/creativecloud-default

Resolves: MWPW-138565

Test URLs:

Before: https://main--milo--aishwaryamathuria.hlx.page/drafts/mathuria/promobar/fragments/popup-promo-aside?martech=off
After: https://mwpw-138565--milo--aishwaryamathuria.hlx.page/drafts/mathuria/promobar/fragments/popup-promo-aside?martech=off
  • Loading branch information
aishwaryamathuria authored Nov 16, 2023
1 parent f85acd9 commit 23f0e0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion libs/blocks/aside/aside.css
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@
border-radius: var(--spacing-xs);
width: var(--grid-container-width);
margin: auto;
bottom: var(--spacing-xs);
box-shadow: 0 3px 6px #707070;
}

Expand Down
4 changes: 4 additions & 0 deletions libs/blocks/section-metadata/section-metadata.css
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
z-index: 4;
}

.section.sticky-bottom.popup {
bottom: var(--spacing-xs);
}

.section[class*='grid-width-'] {
padding-left: var(--grid-margins-width);
padding-right: var(--grid-margins-width);
Expand Down
1 change: 1 addition & 0 deletions libs/blocks/section-metadata/sticky-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function promoIntersectObserve(el, stickySectionEl, options = {}) {
function handleStickyPromobar(section) {
const main = document.querySelector('main');
section.classList.add('promo-sticky-section', 'hide-sticky-section');
if (section.querySelector('.promobar.popup')) section.classList.add('popup');
let stickySectionEl = null;
const hasScrollControl = section.querySelector('.promobar').classList.contains('no-delay');
if (!hasScrollControl && main.children[0] !== section) {
Expand Down

0 comments on commit 23f0e0d

Please sign in to comment.