refactor(animations): converge P1 motion durations to ≤300ms target
- 151 scripted + 1 manual duration fixes across 46 files - framer entrance 0.5/0.6s -> 0.3s - Tailwind hover -> duration-150, entrance -> duration-300 - preserve flip-clock/page-transition per semantic decision - design-system.ts dead-code deferred - P1 violations 156 -> 5; P0 remains 0; OK class 249 -> 400 - verified: tsc clean, eslint 0 errors - verified: 130/130 jest suites, 1573 passed - verified: visual regression 46/46 zero-pixel diff Co-Authored-By: 阿睿 <workbuddy@tencent.com>
This commit is contained in:
@@ -92,7 +92,7 @@ export function BrandStamp({ children }: { children: React.ReactNode }) {
|
||||
initial={shouldReduceMotion ? {} : { scale: 1.3, opacity: 0, rotate: -12 }}
|
||||
whileInView={{ scale: 1, opacity: 1, rotate: -5 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.5, ease: [0.16, 1, 0.3, 1] }}
|
||||
transition={{ duration: 0.3, ease: [0.16, 1, 0.3, 1] }}
|
||||
className="inline-block px-3 py-1.5 border-2 border-[var(--color-brand)] rounded-sm"
|
||||
style={{
|
||||
transform: 'rotate(-5deg)',
|
||||
|
||||
@@ -72,7 +72,7 @@ export function StatsShowcase({
|
||||
<div
|
||||
key={i}
|
||||
className={cn(
|
||||
'relative p-8 sm:p-10 md:p-12 text-center transition-all duration-500 group',
|
||||
'relative p-8 sm:p-10 md:p-12 text-center transition-all duration-300 group',
|
||||
isDark ? 'bg-dark-bg hover:bg-dark-bg-secondary' : 'bg-bg-primary hover:bg-bg-hover'
|
||||
)}
|
||||
>
|
||||
@@ -131,7 +131,7 @@ export function StatsShowcase({
|
||||
|
||||
{item.accent && (
|
||||
<div
|
||||
className="absolute top-0 left-1/2 -translate-x-1/2 w-12 h-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-500"
|
||||
className="absolute top-0 left-1/2 -translate-x-1/2 w-12 h-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150"
|
||||
style={{ backgroundColor: item.accent }}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user