mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
Fix hero backdrop to span full viewport width on wide screens
Use full-bleed margin technique to break out of max-w-6xl container, add explicit w-full to prevent aspect-ratio from shrinking the image container when max-height kicks in, and add overflow-x-hidden to the page wrapper to prevent scrollbar from 100vw units. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,12 +45,12 @@ export function HeroBanner({
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
className="relative -mx-4 -mt-6 mb-4 overflow-hidden sm:-mx-6"
|
||||
className="relative -mt-6 mb-4 ml-[calc(-50vw+50%)] mr-[calc(-50vw+50%)] overflow-hidden"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
>
|
||||
<div className="relative aspect-[21/9] min-h-[280px] max-h-[420px]">
|
||||
<div className="relative w-full min-h-[280px] max-h-[420px] aspect-[21/9]">
|
||||
{backdropPath ? (
|
||||
<Image
|
||||
src={backdropPath}
|
||||
|
||||
Reference in New Issue
Block a user