Skip to content

Commit 6cddc71

Browse files
committed
Comments
Signed-off-by: Peter Kos <pkos91@icloud.com>
1 parent bc8c65e commit 6cddc71

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

sass/main.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,12 +319,16 @@ nav {
319319
}
320320

321321
// Offset clips above the carousel image
322+
// Pos: abs because pos: rel causes the two clips,
323+
// despite having different offsets,
324+
// to interfere with each other when trying to adjust their offset.
322325
.front-clip, .back-clip {
323326
position: absolute;
324327
top: -60px;
325328
}
326329

327330
.front-clip {
331+
// Front clip: move to center of slide, and center the clip.
328332
margin-left: ($slide-size / 2) - ($front-width / 2);
329333
width: $front-width;
330334
height: 80px;
@@ -336,7 +340,9 @@ nav {
336340
width: $back-width;
337341
height: 60px;
338342
background-color: $red;
339-
margin-left: ($slide-size / 2) - ($front-width / 2) - $back-width; // Peek out from top clip
343+
// Back clip: move to center of slide, center clip,
344+
// then do left offset from top clip
345+
margin-left: ($slide-size / 2) - ($front-width / 2) - $back-width;
340346
margin-top: 10px; // Vertical offset from top clip
341347
z-index: 0;
342348
}

0 commit comments

Comments
 (0)