Skip to content

Commit

Permalink
Revert "MWPW-157888 - Hero marquee w/ no-min-height and no l/r padd…
Browse files Browse the repository at this point in the history
…ing when using a `full-width` variant" (#2905)

Revert "MWPW-157888 - Hero marquee w/ `no-min-height` and no l/r padding when…"
This reverts commit eb788ce.
  • Loading branch information
rgclayton authored Sep 18, 2024
1 parent a5d84bc commit 54c3cc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion libs/blocks/hero-marquee/hero-marquee.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
align-items: center;
}

.hero-marquee.no-min-height { min-height: unset; }
.hero-marquee.s-min-height { min-height: var(--s-min-height); }
.hero-marquee.l-min-height { min-height: var(--l-min-height); }

Expand Down
10 changes: 4 additions & 6 deletions libs/blocks/hero-marquee/hero-marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,14 @@ function loadBreakpointThemes() {
export default async function init(el) {
el.classList.add('con-block');
let rows = el.querySelectorAll(':scope > div');
if (rows.length <= 1) return;
const [head, ...tail] = rows;
rows = tail;
if (head.textContent.trim() === '') {
head.remove();
} else {
if (rows.length > 1 && rows[0].textContent !== '') {
el.classList.add('has-bg');
const [head, ...tail] = rows;
handleObjectFit(head);
decorateBlockBg(el, head, { useHandleFocalpoint: true });
rows = tail;
}

// get first row that's not a keyword key/value row
const mainRowIndex = rows.findIndex((row) => {
const firstColText = row.children[0].textContent.toLowerCase().trim();
Expand Down

0 comments on commit 54c3cc0

Please sign in to comment.