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: hide Pin Animation's tiny phone title on phones
matin8b9265eb913d
diff --git a/animations/01-scroll-based/pin-animation/index.html b/animations/01-scroll-based/pin-animation/index.htmlindex 43d27f30..4456bc6f 100644--- a/animations/01-scroll-based/pin-animation/index.html+++ b/animations/01-scroll-based/pin-animation/index.html@@ -42,7 +42,7 @@.outro{height:100cqh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px;border-top:1px solid var(--ui-border)}.outro .panel-title{font-size:clamp(18px,2.5vw,24px);font-weight:700;margin-bottom:10px}.outro p:not(.panel-title){font-size:14px;color:var(--ui-muted);max-width:300px;line-height:1.6}- @media(max-width:600px){.pin-inner{gap:14px;padding:16px}.phone-wrap svg{width:72px;height:131px}}+ @media(max-width:600px){.pin-inner{gap:14px;padding:16px}.phone-wrap svg{width:72px;height:131px}#phone-icon{display:none}}</style><link rel="stylesheet" href="../../../assets/css/demo-page.css?v=4"><script src="../../../assets/js/demo-page.js?v=4" defer></script>diff --git a/docs/superpowers/plans/2026-09-29-scroll-content-part1.md b/docs/superpowers/plans/2026-09-29-scroll-content-part1.mdindex 71b71da6..35bff18e 100644--- a/docs/superpowers/plans/2026-09-29-scroll-content-part1.md+++ b/docs/superpowers/plans/2026-09-29-scroll-content-part1.md@@ -652,12 +652,12 @@ None: leave out the `details.hb-options` block.- **What scrolling shows:** an intro ("Scroll to begin"), then a phone drawing and its text rise into the box and hold still while the box keeps scrolling. Each quarter of that scrolling shows the next of four features: the phone's screen colour and number change with the text. After the fourth feature the phone and text scroll away and the closing panel rises. Scrolling back steps backwards.- **Scroll distance and Play:** a 100cqh intro, the 300cqh pinned section with its sticky frame 100cqh tall, and a 100cqh closing panel: four box heights of scrolling (1,512px at 1280×800, 1,192px on a phone). The phone holds still for two of them, so Play spends three of its six seconds on the four features, about 0.75 seconds each.- **Reduced motion:** nothing scrolls by itself, and nothing needs simplifying: the pin is not an animation and the features change at once. The demo's rule named the side panel's progress bar, which goes, so the rule goes too.-- **Stage font:** site font. The phone's two SVG texts lose `font-family="monospace"`.+- **Stage font:** site font. The phone's two SVG texts lose `font-family="monospace"` and `opacity="0.5"`: with the opacity the number and the title measured 2.3–3.0:1 on the four screen colours, under the 4.5:1 rule (stage text faded with `opacity` below it is fixed in its section); without it they measure 4.9–7.7:1 and the screen still reads as lit.- **Stage:**- `.stage`: `position:relative;overflow-y:auto;scrollbar-width:none;container-type:size;background:#0b0b0d`, with `aria-label="A phone that holds still while its features change"`.- `.intro{height:100cqh}`, `.pin-section{height:300cqh}`, `.pin-inner{position:sticky;top:0;height:100cqh}`, `.outro{height:100cqh}` (were 620px and 1860px, 480px on phones).- The phone drawing gets `aria-hidden="true"`: it repeats the feature's number and title (shared rule 12). On computers it becomes `.phone-wrap svg{height:min(200px,72cqh);width:auto}`, so it fits the 258px box of a 1280×590 window, where it is 186px tall (today's 200px drawing and the 32px padding need 264px). Measured: the phone 35–221px and the text 48–212px down the 258px box; at 1280×800 and above it stays 200px.- - Phone rules (under 600px): the phone stays beside its text (today it stacks above it, and the text is cut off in the 300px box; measured): `.pin-inner{gap:14px;padding:16px}` keeps its row (today's `flex-direction:column` goes), and `.phone-wrap svg{width:72px;height:131px}` in place of `transform:scale(.8)`. Measured with the 14px text: the longest feature's text takes 150px on a 375px phone and 198px on a 320px phone (51–249px down the 298px box).+ - Phone rules (under 600px): the phone stays beside its text (today it stacks above it, and the text is cut off in the 300px box; measured): `.pin-inner{gap:14px;padding:16px}` keeps its row (today's `flex-direction:column` goes), `.phone-wrap svg{width:72px;height:131px}` in place of `transform:scale(.8)`, and `#phone-icon{display:none}`: at 72×131 the screen's title would be 7px tall and an 11px title is wider than the 60px screen, so it is hidden where the text beside the phone repeats it (shared rule 11); the screen keeps its 18px number. Measured with the 14px text: the longest feature's text takes 150px on a 375px phone and 198px on a 320px phone (51–249px down the 298px box).- `.feat-desc` becomes 14px (was 12px), and so do the intro's and the closing panel's text (was 13px).- The intro's and the closing panel's titles become `<p class="panel-title">` (were `h2`, shared rule 13). Today's `.intro p` and `.outro p` rules would also match them, so the text rules exclude the titles and the titles get rules of their own:- `.intro p:not(.panel-title){font-size:14px;color:var(--ui-muted);max-width:340px;line-height:1.65}` and `.outro p:not(.panel-title){font-size:14px;color:var(--ui-muted);max-width:300px;line-height:1.6}` (were `.intro p` and `.outro p` at 13px);