fix: artist hero uses <img> with responsive object-position for better crop
Switching from background-image (inline JS, single position for all sizes) to an <img> element lets CSS media queries apply different object-position: - Mobile: center top (portrait images show face in upper portion) - Desktop: center 30% (wide banner, lower anchor avoids showing only hair) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
106fbf54bf
commit
aa20eec29d
2 files changed
+9
-1
No files matched your search
@@ -824,10 +824,12 @@ button:focus{outline:none}
|
||||
.artist-hero{height:220px;border-radius:14px;overflow:hidden;position:relative;margin-bottom:24px;background:linear-gradient(135deg,var(--surface2),var(--surface))}
|
||||
.artist-hero-overlay{position:absolute;inset:0;background:linear-gradient(to right,rgba(7,7,15,.85) 0%,transparent 100%);display:flex;align-items:flex-end;padding:20px 28px}
|
||||
.artist-hero-name{font-size:32px;font-weight:800;letter-spacing:-1px}
|
||||
.artist-hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top;display:block}
|
||||
@media(min-width:769px){
|
||||
.artist-hero{height:320px;border-radius:16px}
|
||||
.artist-hero-overlay{padding:28px 36px}
|
||||
.artist-hero-name{font-size:46px;letter-spacing:-2px}
|
||||
.artist-hero-img{object-position:center 30%}
|
||||
}
|
||||
|
||||
/* ── MISC ── */
|
||||
|
||||
Reference in new issue
Block a user