Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: Highlighter Sweep: Compare's bands fade at each loop's end, a mode pressed mid-run under reduced motion lets the run finish, and See inside's caption follows a height change

matin8d152edce51d
diff --git a/animations/05-text-typography/highlighter-sweep/index.html b/animations/05-text-typography/highlighter-sweep/index.html
index d182e255..6fdaa0ab 100644
--- a/animations/05-text-typography/highlighter-sweep/index.html
+++ b/animations/05-text-typography/highlighter-sweep/index.html
@@ -88,7 +88,7 @@
.stage[data-hb-mode="compare"] .paper{width:100%;padding:clamp(10px,1.6vw,16px)}
.stage[data-hb-mode="compare"] .para{font-size:clamp(14px,2.3vw,24px)}
.stage[data-hb-mode="compare"] .twin .w::before{transition:none}
- .stage[data-hb-mode="compare"] .twin.out .w::before{transition:opacity .35s linear}
+ .stage[data-hb-mode="compare"] .twin .out .w::before{transition:opacity .35s linear}
.stage[data-hb-mode="compare"].posed .twin .w::before{transform:none;opacity:1;transition:none}
@media(max-width:600px){
.stage[data-hb-mode="compare"]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto minmax(0,1fr);gap:4px 0;padding:8px}
@@ -383,9 +383,10 @@
document.addEventListener('hb:mode',e=>{
mode=e.detail.mode;
if(mode==='normal')pose(false);
- else{pose(!(loopTog.checked&&motionOk()));refresh()}
+ else{pose(!busy&&!(loopTog.checked&&motionOk()));refresh()}
});
new ResizeObserver(()=>refresh()).observe(para);
+ phoneQ.addEventListener('change',()=>paint());
if(document.fonts)document.fonts.ready.then(()=>refresh());
if(!motionOk())for(const k in noteEl)noteEl[k].textContent=NOTES[k].still;
</script>