Skip to content

fix: stop case-study hover accent bar overflowing rounded corners - #161

Merged
westonplatter merged 7 commits into
mainfrom
claude/case-studies-hover-overflow-rp2385
Aug 5, 2026
Merged

fix: stop case-study hover accent bar overflowing rounded corners#161
westonplatter merged 7 commits into
mainfrom
claude/case-studies-hover-overflow-rp2385

Conversation

@westonplatter

@westonplatter westonplatter commented Jul 31, 2026

Copy link
Copy Markdown
Member

what

  • On the /case-studies/ list page, hovering a card no longer shows the gradient accent bar poking past the card's rounded corners on the left edge.
  • Gives .cs-card::before (the hover accent bar) its own border-radius so it traces the card's curve: 18px 0 0 18px on desktop (left edge) and 18px 18px 0 0 in the stacked mobile layout (top edge).

why

  • The card relies on border-radius: 18px + overflow: hidden to clip the accent bar to its rounded corners. On hover the card gets transform: translateY(-3px), which promotes it to a compositing layer — and Chrome/Safari then stop applying the rounded overflow: hidden clip to the composited ::before pseudo-element. Its square corners escaped past the card's rounded corners (visible only on hover, since the bar is opacity: 0 at rest).
  • Rounding the bar's own corners to match the card makes the corner clip irrelevant, fixing the overflow without changing the design (still a flush, full-height left-edge bar) and without any JS or fragile compositor hacks (mask-image, translateZ(0)).

Screenshot (the reported issue)

Hover accent bar's square corners spilling past the card's rounded top-left/bottom-left corners.

Before

CleanShot 2026-08-05 at 12 00 33

After

CleanShot 2026-08-05 at 11 59 49

references

  • Behavior documented in docs/case-studies.md (List page → "Hover accent is a gradient bar on the left edge").
  • Cause: rounded overflow: hidden clip is dropped for composited descendants — long-standing Chromium/WebKit compositing behavior triggered here by the hover transform.

Generated by Claude Code

Summary by CodeRabbit

  • Style
    • Removed the accent bar from case-study cards.
    • Enhanced hover and focus feedback with card lift, brighter borders, deeper shadows, image zoom, and arrow movement.
    • Simplified the mobile card layout.

On the /case-studies/ list page, hovering a card promotes it to a
compositing layer (transform: translateY), at which point Chrome/Safari
stop applying the card's rounded `overflow: hidden` clip to the
composited `::before` accent bar. Its square corners then poked past the
card's 18px rounded corners on the left edge.

Give the bar its own matching left-corner radius (and top-corner radius
in the stacked mobile layout) so it traces the card's curve regardless
of whether the corner clip fires. No design change, no JS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
@netlify

netlify Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit 01899d6
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/6a737967e263a90008dde872
😎 Deploy Preview https://deploy-preview-161--masterpoint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 42
Accessibility: 89
Best Practices: 92
SEO: 79
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

Case-study card styling

Layer / File(s) Summary
Remove case-study accent bar
assets/css/custom.scss
The hover and focus gradient accent and its opacity transition were removed. Existing lift, border, shadow, image zoom, and arrow movement remain. The mobile accent-bar override was also removed.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: oycyc

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the case-study hover accent bar overflow issue addressed by the changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/case-studies-hover-overflow-rp2385

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

westonplatter and others added 6 commits August 5, 2026 11:14
The previous attempt gave the accent bar its own border-radius, but a
4px-wide bar can't trace an 18px corner — the radius clamps to the box
width, so the bar's straight left edge still poked past the card's curve
near the corners once the hover transform composited the layer and
dropped the rounded overflow clip.

Inset the bar past the corner radius instead (top/bottom 20px > the 18px
corner; left/right 20px in the stacked mobile layout) so it lives only on
the straight part of the edge. No clip needed, so the compositing bug
can't apply. Rounded inner ends keep it looking intentional.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
Restore the full-height left-edge accent bar (the inset version read as
an awkward stub) while keeping it from spilling past the rounded corners
on hover.

Paint the bar as the ::before overlay's OWN background — a 4px vertical
gradient stripe on a full-size, border-radius: inherit overlay — instead
of a free-standing child rectangle. A background is always clipped to its
element's border-radius, even after the hover transform composites the
card (the promotion that let the old z-indexed child bar escape the
rounded overflow clip). Full height, fade intact, box-shadow untouched
(no clip-path, which would have clipped the shadow away). Mobile swaps the
stripe to the top edge. Verified in Chromium at desktop + mobile widths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
Thicken the left-edge hover accent from a 4px stripe into a ~50px
vertical gradient band (40px on the stacked mobile top edge) so the
brand teal->pink color occupies a bold band rather than a thin line.

Same technique: the band is the ::before overlay's own background, so it
stays clipped to the card's rounded corners even when the hover transform
composites the layer. Only background-size changes. Verified in Chromium
at desktop + mobile widths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
The preview image is flush to the card's left edge, so any left-edge
accent bar necessarily paints over ("spills" onto) the preview on hover.
Remove the accent bar entirely so a user sees no overlap on hover.

Hover feedback still comes from the lift, brighter border, deeper shadow,
image zoom, and arrow slide -- none of which overlaps the card content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
The Power Digital case-study preview poster had a bright teal->pink
gradient rule across its very top edge. With the list-page card using
object-fit: cover on a portrait image whose aspect matches the column,
the whole poster shows and that strip rendered as a stray accent bar at
the top of the card (unlike the other cards' clean brand tiles).

Crop the top 13px strip off the image (now 698x890). Removes the bar on
the list card and the og image; poster content and footer are untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012v8GzwqM7tDQ22U2Qjh3U6
@westonplatter
westonplatter marked this pull request as ready for review August 5, 2026 17:58
@westonplatter
westonplatter requested a review from a team as a code owner August 5, 2026 17:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/css/custom.scss`:
- Around line 3453-3456: Move the changed case-study custom SCSS from
assets/css/custom.scss into assets/css/style.scss, preserving its selectors and
behavior. Remove the moved rules from custom.scss, then run Trunk to lint and
format the updated SCSS.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 361e4c8d-907d-4400-923f-89b5f745a7d7

📥 Commits

Reviewing files that changed from the base of the PR and between 845328c and 01899d6.

⛔ Files ignored due to path filters (1)
  • static/img/case-studies/power-digital/power-digital-case-study-preview.jpg is excluded by !**/*.jpg
📒 Files selected for processing (1)
  • assets/css/custom.scss

Comment thread assets/css/custom.scss
Comment on lines +3453 to +3456
// No left-edge accent bar: the preview image is flush to the left edge, so
// any bar would paint over ("spill" onto) the preview on hover. Hover
// feedback comes from the lift + brighter border + deeper shadow + image
// zoom + arrow slide instead — nothing overlaps the card content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Keep the custom SCSS in the required file.

The changed case-study styles remain in assets/css/custom.scss. Move this custom SCSS to assets/css/style.scss, then run Trunk for linting and formatting.

As per coding guidelines: assets/css/**/*.scss: Use Bootstrap 5.1.3 as the CSS framework and place custom SCSS in assets/css/style.scss.

Also applies to: 3541-3543

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/css/custom.scss` around lines 3453 - 3456, Move the changed case-study
custom SCSS from assets/css/custom.scss into assets/css/style.scss, preserving
its selectors and behavior. Remove the moved rules from custom.scss, then run
Trunk to lint and format the updated SCSS.

Source: Coding guidelines

@Gowiem Gowiem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Weston!

@oycyc oycyc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for teh scre

@westonplatter
westonplatter merged commit b272768 into main Aug 5, 2026
8 checks passed
@westonplatter
westonplatter deleted the claude/case-studies-hover-overflow-rp2385 branch August 5, 2026 18:18
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.

4 participants