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: Animated Gradient Border: See inside works out its labels and lines again when Soft glow or Border width changes

matin8ac7f386ccc5
diff --git a/animations/04-micro-interactions/gradient-border/index.html b/animations/04-micro-interactions/gradient-border/index.html
index 3f2514ce..2f0d0235 100644
--- a/animations/04-micro-interactions/gradient-border/index.html
+++ b/animations/04-micro-interactions/gradient-border/index.html
@@ -345,6 +345,8 @@
}
function layout(){const m=stage.dataset.hbMode;if(m==='inside')inside();else if(m==='compare')compare()}
document.addEventListener('hb:mode',layout);
+ // a setting can change the button's width (Border width) or hide a label (Soft glow), so the view works out its places again
+ for(const type of ['click','change'])document.querySelector('.hb-try').addEventListener(type,layout);
new ResizeObserver(layout).observe(stage);
if(document.fonts)document.fonts.ready.then(layout);
words();