Skip to content

Commit b15884c

Browse files
fix(marketing): align the endorsement carousel with its heading
#9697 padded the carousel with 100vw math so the first card would sit on the .container edge. On platforms with a classic scrollbar, 100vw is wider than the layout, so the cards landed about half a scrollbar to the right of the heading. Use percentages, which resolve against the section width on every platform. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 931d41f commit b15884c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎apps/marketing/src/pages/index.astro‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,11 @@ const screenshot = await getImage({
826826
gap: 12px;
827827
overflow-x: auto;
828828
overscroll-behavior-x: contain;
829-
padding: 4px max(32px, calc((100vw - 1240px) / 2 + 32px));
830-
scroll-padding-inline: max(32px, calc((100vw - 1240px) / 2 + 32px));
829+
/* Percentages resolve against this element's own box rather than the
830+
viewport, so the first card lines up with the heading's .container edge
831+
even when a classic scrollbar makes 100vw wider than the layout. */
832+
padding: 4px max(32px, calc((100% - 1240px) / 2 + 32px));
833+
scroll-padding-inline: max(32px, calc((100% - 1240px) / 2 + 32px));
831834
}
832835

833836
.endorsement-card {

0 commit comments

Comments
 (0)