Skip to content

Commit

Permalink
Improve layout of featured cards on small screens
Browse files Browse the repository at this point in the history
Temp style overrides to the image card component from the gem to:

- Ensure the space between the image card and the text remains at 15px on mobile, this was previously 30px on mobile.
- Ensure the featured image cards have 15px padding to the left and right when this screen width is =< 319px.
  • Loading branch information
MartinJJones committed Sep 22, 2023
1 parent 17d2335 commit d0dd87f
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions app/assets/stylesheets/views/_homepage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,24 @@

.homepage-section--promotion-slots {
padding-top: govuk-spacing(6);

// temp style overrides, will need to update the image-card component in the gem
// so these can be removed
.gem-c-image-card {
@include govuk-media-query($until: "mobile") {
padding: 0 govuk-spacing(3);
}
}

// temp override to remove the top border
.gem-c-image-card__image {
border-top: none;
}

// temp override to reduce white space on mobile between image and text
.gem-c-image-card__text-wrapper.gem-c-image-card__text-wrapper--two-thirds {
padding-left: 0;
}
}

.homepage-section--links-and-search {
Expand Down Expand Up @@ -307,10 +325,3 @@
padding-right: govuk-spacing(4);
}
}

// temp override to remove the top border,
// will need to update the image-card component in the gem
// this can then be removed
.homepage-section--promotion-slots .gem-c-image-card__image {
border-top: none;
}

0 comments on commit d0dd87f

Please sign in to comment.