Skip to content

Commit 5fd2a09

Browse files
authored
fix(marquee): remove white logo boxes, fix seamless loop, add grayscale hover (#648)
* fix(marquee): remove baked-in white backgrounds from Apple/Google logos Apple and Google were the only two company logos with a hardcoded <rect fill="white"> background, so they rendered as white cards on the chalk marquee while every other logo was transparent. Removing the rect makes them transparent and visually consistent with the rest. * fix(marquee): seamless loop + grayscale hover treatment Seamless loop: the track used space-x-6 (gap only *between* items, none at the copy seam) plus a hand-computed width where itemWidth was 9.5rem instead of the real 10.5rem (w-36 + 1.5rem gap). translateX(-50%) landed ~10rem short of one copy period every cycle, causing a visible jump. Switch to flex w-max with a uniform mr-6 on every item so one copy is exactly 10 units (168px each); -50% now equals one copy exactly (measured seamless delta: 0px). Upgrade: render logos muted grayscale (opacity-60) that colorize and lift to full opacity on hover, so the strip reads as one cohesive set regardless of each brand's native colors. * fix(marquee): use logical margin me-6 and scoped transition
1 parent 33bf8eb commit 5fd2a09

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

resume-builder-ui/public/logos/apple.svg

Lines changed: 0 additions & 1 deletion
Loading

resume-builder-ui/public/logos/google.svg

Lines changed: 0 additions & 1 deletion
Loading

resume-builder-ui/src/components/CompanyMarquee.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ export default function CompanyMarquee({
4444

4545
// Duplicate companies for seamless loop
4646
const duplicatedCompanies = [...companies, ...companies];
47-
const itemWidth = 9.5; // rem (w-38 equivalent)
48-
const totalWidth = duplicatedCompanies.length * itemWidth;
4947

5048
return (
5149
<div className={`relative overflow-hidden h-24 ${className}`}>
@@ -54,23 +52,22 @@ export default function CompanyMarquee({
5452
<div className="absolute right-0 top-0 bottom-0 w-20 bg-gradient-to-l from-chalk via-chalk/90 to-transparent z-10 pointer-events-none" />
5553

5654
<div
57-
className={`flex space-x-6 ${
55+
className={`flex w-max ${
5856
pauseOnHover ? "hover:animation-pause" : ""
5957
}`}
6058
style={{
6159
animation: `marquee ${speed}s linear infinite`,
62-
width: `${totalWidth}rem`,
6360
}}
6461
>
6562
{duplicatedCompanies.map((company, index) => (
6663
<div
6764
key={`${company.name}-${index}`}
68-
className="flex-shrink-0 w-36 h-16 flex items-center justify-center group cursor-default"
65+
className="flex-shrink-0 w-36 me-6 h-16 flex items-center justify-center group cursor-default"
6966
>
7067
<img
7168
src={company.logo}
7269
alt={company.alt}
73-
className="w-28 h-10 object-contain transition-all duration-500"
70+
className="w-28 h-10 object-contain grayscale opacity-60 group-hover:grayscale-0 group-hover:opacity-100 transition duration-500"
7471
width="112"
7572
height="40"
7673
onError={(e) => {

0 commit comments

Comments
 (0)