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

Fix height of images in landing hero component #4408

Merged
merged 1 commit into from
Dec 9, 2024
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
23 changes: 15 additions & 8 deletions app/webpacker/styles/sections/hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ $mobile-cutoff: 800px;
@include mq($from: tablet) {
max-height: 420px;
flex-direction: row-reverse;

// Deeper headings if there's a paragraph
&.deeper {
max-height: fit-content;
Expand Down Expand Up @@ -327,11 +327,11 @@ $mobile-cutoff: 800px;
// If no image use this
&.wide {
width: 100%;

@include mq($from: tablet) {
width: 80%;
width: 80%;
}

h1.title {
margin-top: 0;
}
Expand All @@ -342,7 +342,7 @@ $mobile-cutoff: 800px;
line-height: 1.14;
margin-top: -2.5rem;
margin-bottom: 0;

@include mq($from: tablet) {
margin: 0;
font-size: 3.3rem;
Expand Down Expand Up @@ -379,14 +379,21 @@ $mobile-cutoff: 800px;
}
}

img {
aspect-ratio: 16/9;
width: 100%;
height: auto;
display: block;
}

// Colour themes
@mixin colours($background-color, $highlight-color) {
background-color: $background-color;

h1 span {
background: $highlight-color;
}

&.pastel {
background-color: rgba($background-color, 0.4);
}
Expand All @@ -399,6 +406,6 @@ $mobile-cutoff: 800px;
&.green-pink { @include colours($green, $pink); }
&.green-yellow { @include colours($green, $yellow); }
&.yellow-green { @include colours($yellow, $green); }
&.yellow-yellow { @include colours($yellow, $yellow); }
&.yellow-yellow { @include colours($yellow, $yellow); }
&.grey-pink { @include colours($grey, $pink); }
}
Loading