Skip to content

Commit 4945fcd

Browse files
committed
Fix additional weird issues with pampers images on homepage
Replaces absolute positioning with flex for a hopefully more predictably stable solution
1 parent 96d480c commit 4945fcd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/index.webc

+10-10
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,23 @@ description: "art director/designer"
177177
transform: translateY(calc(15% * calc(var(--scroll-pct) - 0.3)));
178178
}
179179

180-
#pampers img:is(.left, .right) {
181-
position: absolute;
182-
top: 0;
183-
width: 32%;
180+
#pampers aside {
181+
display: flex;
182+
align-items: center;
183+
justify-content: center;
184184
}
185185

186-
#pampers img.left {
187-
left: 12%;
186+
#pampers aside picture {
187+
display: contents;
188188
}
189-
#pampers img.right {
190-
left: 62%;
189+
190+
#pampers img:is(.left, .right) {
191+
width: 31%;
191192
}
192193

193194
#pampers img.center {
194-
position: absolute;
195195
width: 35%;
196-
left: 32.5%;
196+
margin: 0 -9%;
197197
z-index: 1;
198198
transform: translateY(calc(20% * calc(var(--scroll-pct) - 0.5)));
199199
}

0 commit comments

Comments
 (0)