Fix green-dots watermark drifting from "100T" at wide viewports - #31
Merged
Merged
Conversation
Same root cause and fix pattern as the carousel-story photo/dots drift: left:-55px lived directly in .cards-stat-container (the full-bleed section), so it resolved against that element's own true edge — not against the max-width:1200px centered grid "100T" and the other stats sit in. That value was a margin from the true edge, correct-looking only at the specific viewport width it was measured at; at any wider width the true edge moves further from the grid's own edge than the grid's does, dragging this watermark away from "100T" the wider the screen gets. Confirmed directly: 39px gap from "100T" at 1464px, 267px at 1920px. Fixed via a calc() formula instead of a wrapping reference element (the approach used for carousel-story's analogous fix) — the existing comments on .cards-stat-container's own wrappers already flag why giving them their own position would risk lifting the picture's paint layer above the stat-grid block that follows it in DOM order, so introducing a new positioned wrapper here isn't the lower-risk option it was for carousel-story. (100vw - 1200px)/2 is the grid's own left edge (standard centering math, valid because this section is genuinely full-bleed so its own width is the viewport's), then offset by "100T"'s own 80px padding, fortinet.com's measured 32px gap, and this image's own 228px width. fortinet.com's real gap between its first stat number and its own green-dots watermark is a constant 32px, verified directly at both 1464px and 1920px (identical both times) — recalibrated from that real, width-independent relationship rather than reusing a value that only happened to look right at one width. Verified: gap between "100T" and the watermark is now 32px at both 1464px and 1920px (was 39px vs 267px before this fix). Mobile unaffected (fix is scoped to the existing >=900px media query). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
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
Same bug pattern as the carousel-story photo/dots drift fixed in PR #30: the green-dots watermark in the "FortiGuard Labs" section (
cards-stat) hadleft: -55pxset directly on.cards-stat-container(the full-bleed dark section), so it resolved against that element's own true left edge — not against themax-width:1200pxcentered grid that "100T" and the other stats sit in. That value was a margin from the true edge, correct-looking only at the specific width it happened to be measured at.Confirmed directly: 39px gap from "100T" at 1464px, 267px at 1920px.
Fix: recalibrated via a
calc()formula —(100vw - 1200px)/2gives the stat grid's own left edge (valid since this section is genuinely full-bleed, so its width is the viewport's), offset by "100T"'s own 80px padding, fortinet.com's measured 32px gap, and the watermark's own 228px width. Usedcalc()instead of a wrapping reference element (the approach used for carousel-story) since the existing comments here already flag why giving these wrappers their own positioning would risk lifting the picture's paint layer above the stat-grid block that follows it in DOM order.Checked fortinet.com directly: its own first stat number and green-dots watermark stay a constant 32px apart at both 1464px and 1920px.
Verified: gap between "100T" and the watermark is now 32px at both widths (was 39px vs 267px). Mobile unaffected (fix scoped to the existing
>=900pxmedia query).Test URL
https://cards-stat-dots-position--modernization-agent-test--samshao.aem.page/
🤖 Generated with Claude Code