Skip to content

Commit 0b6e899

Browse files
Khushi256limzykenneth
authored andcommitted
fix: adjust landscape hero images to fill header on mobile (#1222)
1 parent 273d82a commit 0b6e899

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

src/components/PageHeader/HomePage.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const { config } = Astro.props;
4141
im.linkTarget ?
4242
<a href={im.linkTarget} class={`max-lg:flex-1 max-lg:min-h-0 hero-image-container ${i > 0 ? "hidden" : ""}`}>
4343
<Image
44-
containerClass={"relative"}
44+
containerClass={"relative h-full"}
4545
class={"hero-image"}
4646
aspectRatio="none"
4747
src={im.image}
@@ -80,4 +80,4 @@ const { config } = Astro.props;
8080
}
8181
}
8282
});
83-
</script>
83+
</script>

styles/global.scss

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ code {
207207
background-color: var(--bg-gray-80);
208208
border-radius: 20px;
209209
padding: 0 var(--spacing-xxs);
210-
211210
.dark-theme &:not(.code-box) {
212211
color: var(--type-black);
213212
}
@@ -231,18 +230,16 @@ section,
231230
h2,
232231
.text-h2 {
233232
margin-top: var(--gutter-md);
234-
margin-bottom: var(--spacing-md);
233+
margin-bottom: 0px;
235234
}
236235

237236
h2,
238237
.text-h2,
239238
h3,
240239
text-h3 {
241-
242240
&,
243-
&>* {
241+
& > * {
244242
scroll-margin-top: var(--gutter-md);
245-
246243
@media (min-width: $breakpoint-tablet) {
247244
scroll-margin-top: var(--gutter-sm);
248245
}
@@ -272,7 +269,6 @@ section,
272269
overflow-x: auto;
273270

274271
border-radius: 20px;
275-
276272
@media (max-width: $breakpoint-tablet) {
277273
border-radius: 10px;
278274
}
@@ -474,15 +470,11 @@ th {
474470
border-bottom-width: 1px;
475471
border-top-width: 1px;
476472

477-
// Fix #1061: On mobile/tablet (< 1024px) the outer wrapper is a flex column
478-
// and the image container is flex-1. height: 100% fills the remaining header
479-
// space exactly — no overflow into the h1 below, no gap on tall devices.
480473
@media (max-width: #{$breakpoint-laptop - 1px}) {
481474
height: 100%;
482475
max-height: none;
483476
min-height: 180px;
484477
}
485-
486478
@media (min-width: $breakpoint-tablet) {
487479
left: calc(-1 * var(--spacing-lg));
488480
width: calc(100% + var(--spacing-lg) * 2);
@@ -496,7 +488,6 @@ hr.full-bleed {
496488
left: -2.5rem;
497489
width: calc(100% + 5rem);
498490
max-width: calc(100% + 5rem);
499-
500491
@media (min-width: $breakpoint-tablet) {
501492
left: calc(-1 * var(--spacing-lg));
502493
width: calc(100% + var(--spacing-lg) * 2);
@@ -516,13 +507,10 @@ input[type="search"]::-webkit-search-results-decoration {
516507
.no-scrollbar::-webkit-scrollbar {
517508
display: none;
518509
}
519-
520510
/* Hide scrollbar for IE, Edge and Firefox */
521511
.no-scrollbar {
522-
-ms-overflow-style: none;
523-
/* IE and Edge */
524-
scrollbar-width: none;
525-
/* Firefox */
512+
-ms-overflow-style: none; /* IE and Edge */
513+
scrollbar-width: none; /* Firefox */
526514
}
527515

528516
/** SPECIAL ELEMENTS **/

0 commit comments

Comments
 (0)