Skip to content

Commit

Permalink
fix(shs-5572): arrows on a Spotlight (with no image) displaying incor…
Browse files Browse the repository at this point in the history
…rectly on mobile (#1503)

Co-authored-by: Mari Núñez <mariannuar@admins-MacBook-Pro.local>
Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent 512680a commit bba5a7d
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docroot/themes/humsci/humsci_airy/css/humsci_airy.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ const restrictHeight = () => {
textBoxes.forEach(
(textBox) => isSpotlightTextBox(textBox) && setMinHeight(textBox, maxBoxHeight),
);

// Find images inside each slider.
const imageWrapper = slide.querySelector('.hb-spotlight__image-wrapper');
if (slide.classList.contains('paragraph--type--hs-sptlght-slder') && !imageWrapper) {
slide.classList.add('paragraph--type--hs-sptlght-slder--no-image');
}
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@
@include hb-pairing-color('border-color', 'secondary-darken-12');

&:hover {
@include hb-pairing-color('background-color', 'secondary-darken-12');
@include hb-pairing-color('border-color', 'secondary-darken-12');
@include hb-pairing-color(
'background-color',
'secondary-darken-12'
);
@include hb-pairing-color(
'border-color',
'secondary-darken-12'
);
@include hb-global-color('color', 'white');
}
}
Expand Down Expand Up @@ -149,3 +155,40 @@
}
}
}

.paragraph--type--hs-sptlght-slder.paragraph--type--hs-sptlght-slder--no-image {
@media only screen and (max-width: 767px) {
.hb-spotlight {
height: 100%;
}

.slick-track {
bottom: 0;
height: 100%;
}

.slick__slide > div:first-child {
height: 100%;
}

.slick-prev {
@include hb-traditional {
bottom: 15% !important;
}

@include hb-themes(('colorful', 'airy')) {
bottom: 25% !important;
}
}

.slick-next {
@include hb-traditional {
bottom: 55% !important;
}

@include hb-themes(('colorful', 'airy')) {
bottom: 55% !important;
}
}
}
}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docroot/themes/humsci/humsci_colorful/js/index.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docroot/themes/humsci/humsci_traditional/js/index.js

Large diffs are not rendered by default.

0 comments on commit bba5a7d

Please sign in to comment.