diff --git a/src/components/hy-hero/hy-hero.scss b/src/components/hy-hero/hy-hero.scss index d6b8a16b8132d0e1eebefd9c662191f283e5ae1b..c1cfd09b348a888e0a99aa281259ad75075f0574 100644 --- a/src/components/hy-hero/hy-hero.scss +++ b/src/components/hy-hero/hy-hero.scss @@ -228,7 +228,7 @@ .hy-hero.hy-hero--common { @include breakpoint($overwide) { margin-left: -32px; - padding-left: 64px; + padding-left: 32px; } } diff --git a/src/components/hy-hero/hy-hero.tsx b/src/components/hy-hero/hy-hero.tsx index d01ce6be84984b05f57b324c3a444e4be2ff5ad2..3969d470987b65ea74decc2ae4482c59f8261a64 100644 --- a/src/components/hy-hero/hy-hero.tsx +++ b/src/components/hy-hero/hy-hero.tsx @@ -42,8 +42,8 @@ export class HyHero { if (!contentWrapper) return; if (document.body.scrollWidth >= 1441) { - const marginLeft = window.getComputedStyle(contentWrapper).getPropertyValue('margin-left'); - contentDiv.style.left = marginLeft !== '0px' ? marginLeft : '32px'; + const marginLeft = parseInt(window.getComputedStyle(contentWrapper).getPropertyValue('margin-left')) + 32; + contentDiv.style.left = marginLeft !== 32 ? `${marginLeft}px` : '32px'; } else { contentDiv.style.left = window.getComputedStyle(contentWrapper).getPropertyValue('padding-left'); } diff --git a/src/index.html b/src/index.html index 3967c93eacfb5129b108d7396c5cb294d86f013e..c6a12cb33da5f87cbe4e5456cf91be7252829f1b 100644 --- a/src/index.html +++ b/src/index.html @@ -171,8 +171,8 @@ <hy-hero color-variant="blue" image="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/ambassadors_toolo_4_1920x1080_original_hero_valoisampi.jpg" - heading="Congratulations to our new students" - description="University of Helsinki is ranged high in comparison with the worlds research universities." + heading="Become a part of our fantastic cheerful team" + description="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient." url="https://www.helsinki.fi/fi/uutiset" url-title="See latest publications" sc-label="Aria label"