Skip to content

Commit fe85c7e

Browse files
authored
fix: Stretched feature images on mobile (#157)
1 parent b7877f4 commit fe85c7e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/data/features.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const FEATURES: FeatureItem[] = [
2020
width: 2000,
2121
height: 1300,
2222
hyperlink: 'leo-rover',
23-
style: { width: 'auto', height: 260, paddingBottom: 20, marginTop: 40 },
23+
style: { width: 'auto', height: 260, marginTop: 40 },
2424
},
2525
text: (
2626
<span>
@@ -36,7 +36,7 @@ const FEATURES: FeatureItem[] = [
3636
width: 2000,
3737
height: 1500,
3838
hyperlink: 'raph-rover',
39-
style: { width: 'auto', height: 300, paddingBottom: 20 },
39+
style: { width: 'auto', height: 300 },
4040
},
4141
text: (
4242
<span>

src/pages/index.module.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,17 @@
8888

8989
.featureImage {
9090
padding: 10px;
91+
object-fit: contain;
92+
object-position: bottom;
93+
padding-bottom: 20px;
9194
}
9295

9396
@media screen and (max-width: 996px) {
9497
.featureContainer {
9598
margin-left: auto;
9699
margin-right: auto;
97100
}
101+
.featureImage {
102+
margin: 0 !important;
103+
}
98104
}

0 commit comments

Comments
 (0)