Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

615 Carousel not working on legacy Firefox browsers fix #617

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions blocks/carousel/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ export default function decorate(block) {
const content = contentEl.closest('div');
content.classList.add(...'lg:w-1/2 px-4 lg:px-8 xl:pr-10 pb-10 pt-6 md:pt-4 lg:py-20'.split(' '));
const heading = content.querySelector('h2');
const paragraphs = content.querySelectorAll('p:not(.button-container):not(:has(a[title="link"]))');
const paragraphs = content.querySelectorAll('p:not(.button-container)');
const allBtns = content.querySelectorAll('p.button-container .btn, a[title="link"]');
if (heading) heading.classList.add(...'text-2xl md:text-4xl tracking-wide md:tracking-tight m-0 font-medium md:font-normal leading-8 md:leading-[55px]'.split(' '));
if (paragraphs.length > 0) {
paragraphs.forEach((paragraph) => {
paragraphs.forEach((paragraph) => {
if (!paragraph.querySelector('a[title="link"]')) {
if (paragraph.nextElementSibling && ['H1', 'H2', 'H3'].includes(paragraph.nextElementSibling.nodeName)) paragraph.classList.add(...'text-danaherpurple-500'.split(' '));
else paragraph.classList.add(...'text-xl font-extralight tracking-tight leading-7 mt-6'.split(' '));
});
}
}
});
if (allBtns.length > 0) {
const actions = div({ class: 'flex flex-col md:flex-row gap-5 mt-10' });
allBtns.forEach((elBtn) => {
Expand Down