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.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
fix: put Hover State's underline under the word, not across the whole card
matin43fd098b8032
diff --git a/animations/04-micro-interactions/hover-state/index.html b/animations/04-micro-interactions/hover-state/index.htmlindex 2bfd42fa..934ceb50 100644--- a/animations/04-micro-interactions/hover-state/index.html+++ b/animations/04-micro-interactions/hover-state/index.html@@ -45,7 +45,7 @@.h-lift:active,.h-lift.is-demo{transform:translateY(-4px)}.h-lift:active::after,.h-lift.is-demo::after{opacity:1}/* 4. Underline: a line as wide as the link, scaled out from the left */- .h-underline .card-link{display:inline-block;position:relative;color:var(--ui-accent);font-size:15px;font-weight:700}+ .h-underline .card-link{display:inline-block;align-self:flex-start;position:relative;color:var(--ui-accent);font-size:15px;font-weight:700}.h-underline .card-link::after{content:'';position:absolute;bottom:-2px;left:0;width:100%;height:1px;background:var(--ui-accent);transform:scaleX(0);transform-origin:left;transition:transform var(--dur) var(--ease)}@media(hover:hover){.h-underline:hover .card-link::after{transform:scaleX(1)}}.h-underline:active .card-link::after,.h-underline.is-demo .card-link::after{transform:scaleX(1)}diff --git a/docs/superpowers/plans/2026-09-29-micro-content-part1.md b/docs/superpowers/plans/2026-09-29-micro-content-part1.mdindex cba4d2c9..524b54c7 100644--- a/docs/superpowers/plans/2026-09-29-micro-content-part1.md+++ b/docs/superpowers/plans/2026-09-29-micro-content-part1.md@@ -110,7 +110,7 @@ Each section says what "stops" also undoes.- **Stage font:** site font. `.hcard-name` and `.card-link` get `font-size:15px` and `font-weight:700`.- **Stage:** the six cards stay, two to a row on every screen (the phone rule that made one column goes). The small "Technique 1" to "Technique 6" labels go, and the names become plain: "Color change", "Grow", "Lift", "Underline" (the link text of the underline card), "Arrow nudge" (with its →) and "Sweep". `.hgrid` gets `gap:10px`; `.hcard` gets `min-height:72px` and `padding:14px 12px`; the stage gets `padding:16px`. The wrapper `div` around the grid keeps `width:100%`. `hb-dots`: yes. Measured: 270px on a phone, at 320px wide and on a laptop (six cards of 72px make a 236px grid, with 32px of padding and 2px of border). On the short stage (see the preamble), `@media(min-width:601px) and (max-height:620px){.stage{padding:10px}}` lets the padding give way, so the cards keep their size and nothing overflows.- Two changes move to transform and opacity (see the preamble). Today the underline grows by `width` and the lift adds a `box-shadow`.- - The underline: `.h-underline .card-link::after` gets `width:100%`, `transform:scaleX(0)` and `transform-origin:left`, and a `transform` transition. It grows with `transform:scaleX(1)` on hover, `:active` and `.is-demo`.+ - The underline: `.h-underline .card-link::after` gets `width:100%`, `transform:scaleX(0)` and `transform-origin:left`, and a `transform` transition. It grows with `transform:scaleX(1)` on hover, `:active` and `.is-demo`. Owner choice (final fix wave): the link gets `align-self:flex-start`, so the line is as wide as the word, not the whole card.- The lift: `.h-lift` gets `overflow:visible` and keeps only its `translateY(-4px)`, with a `transform` transition. Its shadow moves to `.h-lift::after` (`content:'';position:absolute;inset:0;border-radius:inherit;box-shadow:0 8px 24px rgba(0,0,0,.6);opacity:0;pointer-events:none;transition:opacity var(--dur) var(--ease)`), which fades in (`opacity:1`) on hover, `:active` and `.is-demo`.- The reduced-motion rule also lists `.h-lift::after`.