Skip to content

fix(unity-bootstrap-theme): hero small CTA overflow at <768px (UDS-2171)#1688

Open
juanmitriatti wants to merge 1 commit intodevfrom
UDS-2171
Open

fix(unity-bootstrap-theme): hero small CTA overflow at <768px (UDS-2171)#1688
juanmitriatti wants to merge 1 commit intodevfrom
UDS-2171

Conversation

@juanmitriatti
Copy link
Copy Markdown
Contributor

Summary

  • Fixes the QA finding from UDS-2171: at viewports between mobile and the 768px breakpoint (e.g. 764×921, 200% zoom on small screens, mobile DevTools view), the Small Hero CTA button hangs out of the hero image into the section below.
  • Root cause: `.btn-row` used `position: absolute; top: 15rem` (240px) inside a container with `min-height: 16rem` (256px) and default `overflow: visible` — button bottom (240+~44=284) exceeded the container by ~28-36px until `min-width: 768px` swapped to grid placement.
  • Fix scoped to `uds-hero-sm` only: replace the absolute positioning with the same grid-flow pattern already used at tablet+ (`grid-row: 4; position: relative; margin-top: 1rem`). Container now expands naturally to contain the button. `uds-hero-md` and `uds-hero-lg` are intentionally untouched (not part of the QA report).

Diff

```diff
@@ div.uds-hero-sm.has-btn-row .btn-row @@
align-self: flex-start;
flex-wrap: wrap;

  •  top: 15rem;
    
  •  grid-row: 4;
    
  •  position: relative;
    
  •  margin-top: 1rem;
    

```

3 lines added, 1 removed. `yarn css-lint` passes; full SCSS compiles cleanly.

Test plan

Tested in Chrome at multiple viewports (computed styles + visual screenshots):

viewport hero h btn position overflow
764×921 (the reported bug) 260px rel, grid-row:4, mt:16 −48px (contained ✓)
767×921 (just below breakpoint) 260px rel, grid-row:4 −48px ✓
500×921 (mobile) 256px rel, grid-row:4 −48px ✓
800×921 (tablet+) 260px rel, grid-row:4, mt:16 −48px ✓ (identical to existing tablet+ behavior)
764×921 Medium Hero 336px abs, top:320 (untouched) unchanged from main
  • Verify on `websparkci-dev-asufactory1.acquia.asu.edu/hero` after deploy
  • Confirm 200% zoom at small screens shows button contained
  • Confirm Medium/Large heroes look unchanged (out of scope for this ticket)

Move .btn-row out of position:absolute (with hard-coded top:15rem) into
grid-row:4 with position:relative, matching the existing tablet+ pattern.
The container now expands naturally to contain the button instead of
overflowing at viewports between mobile and the 768px breakpoint
(reproduced at 764x921). Adds margin-top:1rem to give the requested
breathing room between heading and button. Scoped to uds-hero-sm only.
@juanmitriatti juanmitriatti requested a review from a team as a code owner May 1, 2026 16:09
@asu-jenkins-devops
Copy link
Copy Markdown
Collaborator

@juanmitriatti juanmitriatti self-assigned this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants