Skip to content
Snippets Groups Projects
Commit 33f7ea64 authored by Tuukka Turu's avatar Tuukka Turu
Browse files

Small margin calc change

parent bcf4ba13
No related branches found
No related tags found
No related merge requests found
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
.hy-hero.hy-hero--common { .hy-hero.hy-hero--common {
@include breakpoint($overwide) { @include breakpoint($overwide) {
margin-left: -32px; margin-left: -32px;
padding-left: 64px; padding-left: 32px;
} }
} }
......
...@@ -42,8 +42,8 @@ export class HyHero { ...@@ -42,8 +42,8 @@ export class HyHero {
if (!contentWrapper) return; if (!contentWrapper) return;
if (document.body.scrollWidth >= 1441) { if (document.body.scrollWidth >= 1441) {
const marginLeft = window.getComputedStyle(contentWrapper).getPropertyValue('margin-left'); const marginLeft = parseInt(window.getComputedStyle(contentWrapper).getPropertyValue('margin-left')) + 32;
contentDiv.style.left = marginLeft !== '0px' ? marginLeft : '32px'; contentDiv.style.left = marginLeft !== 32 ? `${marginLeft}px` : '32px';
} else { } else {
contentDiv.style.left = window.getComputedStyle(contentWrapper).getPropertyValue('padding-left'); contentDiv.style.left = window.getComputedStyle(contentWrapper).getPropertyValue('padding-left');
} }
......
...@@ -171,8 +171,8 @@ ...@@ -171,8 +171,8 @@
<hy-hero <hy-hero
color-variant="blue" color-variant="blue"
image="https://www.helsinki.fi/sites/default/files/styles/16_9_huge/public/ambassadors_toolo_4_1920x1080_original_hero_valoisampi.jpg" 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" heading="Become a part of our fantastic cheerful team"
description="University of Helsinki is ranged high in comparison with the worlds research universities." 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="https://www.helsinki.fi/fi/uutiset"
url-title="See latest publications" url-title="See latest publications"
sc-label="Aria label" sc-label="Aria label"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment