fix(reveal): threshold 0 — les sections plus hautes que le viewport ne se révélaient jamais

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 00:39:49 +02:00
parent 553bb6d9a3
commit dca140271c

View File

@@ -30,7 +30,10 @@ export function initReveal(selector = "[data-reveal]") {
}
}
},
{ threshold: 0.15, rootMargin: "0px 0px -10% 0px" }
// threshold 0 : un bloc plus haut que le viewport ne peut jamais
// atteindre un ratio > viewport/bloc — le rootMargin -10% suffit
// à éviter les déclenchements au ras du bord.
{ threshold: 0, rootMargin: "0px 0px -10% 0px" }
);
targets.forEach((el) => {