File tree Expand file tree Collapse file tree 1 file changed +24
-15
lines changed
Expand file tree Collapse file tree 1 file changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export default class HomeStyles {
1717 max(calc(var(--vh) * .15), 70px); /* Contacts */
1818 justify-content: center;
1919 width: 100%;
20+ overflow-x: hidden; /* guard against any stray overflow */
2021 `
2122
2223 static readonly TitleContainer = styled . div `
@@ -112,20 +113,28 @@ export default class HomeStyles {
112113 `
113114
114115 static readonly VideoSource = styled . div `
115- display: grid;
116- grid-template-columns: 50% 50%;
117- grid-template-rows: 100%;
118- align-items: center;
119- margin-bottom: calc(var(--vh) * .02);
120-
121- & > * {
122- margin-left: 5%;
123- margin-right: 5%;
124- }
125-
126- & > img {
127- height: 100%;
128- justify-self: right;
129- }
116+ display: grid;
117+ grid-template-columns: 1fr 1fr;
118+ align-items: center;
119+ padding: 0 5%; /* replaces child margins */
120+ gap: 1rem; /* spacing between grid items */
121+ margin-bottom: calc(var(--vh) * .02);
122+
123+ & > * {
124+ margin: 0; /* remove overflow-causing margins */
125+ }
126+
127+ & > img {
128+ justify-self: end;
129+ max-width: 100%; /* never exceed its column */
130+ height: auto; /* keep aspect ratio on mobile */
131+ }
132+
133+ /* Stack on very small screens to avoid squish */
134+ @media (max-width: 600px) {
135+ grid-template-columns: 1fr;
136+ justify-items: center;
137+ text-align: center;
138+ }
130139 `
131140}
You can’t perform that action at this time.
0 commit comments