Skip to content

Commit ae81878

Browse files
committed
fix: update mobile breakpoint
1 parent 2b36b12 commit ae81878

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

src/components/InstagramWidget.astro

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,46 @@ const {
4242
<style>
4343
/* Overall Sidebar Width */
4444
.instagram-sidebar-card {
45-
width: 300px;
45+
width: 100%;
46+
}
47+
48+
@media (min-width: 1536px) {
49+
.instagram-sidebar-card {
50+
width: 300px;
51+
}
4652
}
4753

4854
/* Shrink the embed by 25% (0.75 scale) */
4955
.instagram-scaler-container {
5056
width: 100%;
51-
height: 350px; /* Limits vertical space */
57+
height: 500px; /* Limits vertical space */
5258
overflow-y: auto;
5359
overflow-x: hidden;
5460
scrollbar-width: none;
5561
}
5662

63+
@media (min-width: 1536px) {
64+
.instagram-scaler-container {
65+
height: 350px;
66+
}
67+
}
68+
5769
/* Targets the iframe generated by Instagram's script */
5870
.instagram-scaler-container :global(iframe) {
59-
transform: scale(0.79) !important;
71+
transform: scale(0.79) !important;
6072
transform-origin: top left !important;
6173
width: 190% !important; /* Math: (1 / 0.72) * 100 to fill width */
6274
min-width: 326px !important;
6375
}
6476

77+
@media (max-width: 1535px) {
78+
.instagram-scaler-container :global(iframe) {
79+
transform: scale(1) !important;
80+
width: 100% !important;
81+
min-width: unset !important;
82+
}
83+
}
84+
6585
.instagram-media {
6686
margin: 0 !important;
6787
border: none !important;

0 commit comments

Comments
 (0)