Skip to content

Commit 3719992

Browse files
committed
Make image card elements stack on mobile
1 parent 4e19536 commit 3719992

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@include govuk-text-colour;
1414

1515
@include govuk-media-query($until: tablet) {
16-
flex-direction: row-reverse;
16+
flex-direction: column-reverse;
1717
gap: govuk-spacing(3);
1818
}
1919
}
@@ -39,8 +39,17 @@
3939
width: 100%;
4040
border: 0;
4141
border-top: 1px solid $govuk-border-colour;
42+
43+
@include govuk-media-query($until: tablet) {
44+
max-width: 320px;
45+
}
4246
}
4347

48+
.gem-c-image-card--large .gem-c-image-card__image {
49+
@include govuk-media-query($until: tablet) {
50+
max-width: 100%;
51+
}
52+
}
4453
.gem-c-image-card__title {
4554
margin: 0;
4655
}
@@ -142,7 +151,7 @@
142151
border-top: none;
143152
}
144153

145-
@include govuk-media-query($until: "mobile") {
154+
@include govuk-media-query($until: mobile) {
146155
flex-direction: column-reverse;
147156
}
148157
}

0 commit comments

Comments
 (0)