Fix gallery-control alignment in discover-cards on wide viewports - #712
Merged
Conversation
echen-adobe
requested review from
maxn-adobe,
meganthecoder and
nateyolles
as code owners
August 25, 2026 23:55
nateyolles
approved these changes
Aug 25, 2026
hadobe
approved these changes
Aug 26, 2026
fullcolorcoder
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a misalignment between the discover-cards gallery navigation arrows (
.gallery-control) and the card gallery (.cards-container) on wide viewports (≥1680px)..cards-containeris capped atmax-width: 1700pxand centered (margin: auto) once the viewport passes 1680px..gallery-control— a sibling element holding the prev/next nav buttons, right-aligned viajustify-content: flex-end— had no matchingmax-width/centering, so it stayed full width and its buttons drifted away from the actual right edge of the centered card gallery, instead of sitting flush with it.Fix: mirror the same
max-width: 1700pxon.gallery-control, and addmargin: 0 autoin the same@media (min-width: 1680px)block that centers.cards-container, so both elements share the same effective right edge at all viewport widths.Verified with a Playwright harness (mock DOM + real CSS) at a 2200px viewport: before the fix,
.gallery-control's right edge sat 234px past.cards-container's right edge; after the fix, both align exactly (0px diff).Jira Ticket
N/A
Test URLs
Verification Steps
/express/homepage) at a browser width ≥1680px (try 1920px or wider)..cards-containerisn't centered and the arrows should look unchanged..gallery-controlbuttons are horizontally flipped in RTL (html[dir="rtl"] .discover-cards .gallery-control button { transform: scaleX(-1); }), so confirm alignment still holds withjustify-content: flex-endunder RTL layout direction.Potential Regressions
discover-cardsblock (standard and.flipvariants), at wide (≥1680px) viewports.Additional Notes
Scoped entirely to
express/code/blocks/discover-cards/discover-cards.css(4 lines added, no JS changes). Passedstylelintand the repo'slint-css-varscheck with no issues.