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: below 820px the top bar leaves the Star link out, since even the round star cut page names there; the star row covers those screens (the owner's choice after the final review)
matin92c822589a4a
diff --git a/assets/css/demo-page.css b/assets/css/demo-page.cssindex be2649e4..aa89fadb 100644--- a/assets/css/demo-page.css+++ b/assets/css/demo-page.css@@ -38,8 +38,9 @@ body.hb [hidden]{display:none!important}.hb-pager a > span{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:1.5}.hb-bar .hb-ic{width:16px;height:16px}/* The Star link: the last item of the top bar. The pager's auto margin puts the two together at the right end (with- space-between alone the pager would sit in the middle). Computers (from 1061px) read "Star on GitHub", narrower screens- get a round star so the page names keep their room, and phones leave it out: the star row under the prompt card is theirs. */+ space-between alone the pager would sit in the middle). Computers (from 1061px) read "Star on GitHub", screens from 820px+ to 1060px get a round star, and narrower screens leave it out so the page names keep their room: the star row under the+ prompt card is theirs. */.hb-bar .hb-pager{margin-left:auto}.hb-bar .hb-star{box-sizing:border-box;flex:none;padding:0 14px;border:1px solid var(--hb-edge);border-radius:999px;color:var(--hb-soft)}@@ -205,7 +206,7 @@ textarea.hb-text{min-height:88px;padding:10px 12px;resize:vertical}@media(max-width:759px){.hb-settings,.hb-about{grid-template-columns:minmax(0,1fr)}}-/* Below 1061px the Star link is a round 44px star with no words (its aria-label still names it) */+/* From 820px to 1060px the Star link is a round 44px star with no words (its aria-label still names it) */@media(max-width:1060px){.hb-bar .hb-star{width:44px;padding:0;justify-content:center}.hb-bar .hb-star>span{display:none}@@ -214,6 +215,11 @@ textarea.hb-text{min-height:88px;padding:10px 12px;resize:vertical}@media(max-width:1024px){.hb-bar .hb-dir{display:none}}+/* Below 820px the Star link leaves the top bar: even as a round star it would cut the page names on many pages, and the+ star row under the prompt card asks instead */+@media(max-width:819px){+ .hb-bar .hb-star{display:none}+}/* The narrowest phones (down to 320px): the full home link and the two chevron links only fit on one line with a littleless spacing and type. The home link keeps all its text. */@media(max-width:359px){@@ -254,7 +260,6 @@ textarea.hb-text{min-height:88px;padding:10px 12px;resize:vertical}.hb-prompt.is-clamped{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.hb-prompt-more{display:inline-flex;align-items:center}.hb-copy{width:100%}- .hb-bar .hb-star{display:none}.hb-star-btn{width:100%}.hb-foot{justify-content:space-between}.hb-foot>span{flex-basis:100%}diff --git a/docs/superpowers/plans/2026-10-12-star-button.md b/docs/superpowers/plans/2026-10-12-star-button.mdindex 04766948..de8817c0 100644--- a/docs/superpowers/plans/2026-10-12-star-button.md+++ b/docs/superpowers/plans/2026-10-12-star-button.md@@ -17,7 +17,7 @@ Spec: `docs/superpowers/specs/2026-10-12-star-button-design.md`.## Global Constraints- No build step, no frameworks, no npm packages. Do not edit anything under `.claude/worktrees/` (old copies of the site).-- Work on the branch `feat/star-button` in the main checkout (`C:\Users\matin\OneDrive\Desktop\Projects\animation-handbook`). Never push.+- Work on the branch `feat/star-button` in the main checkout. Never push.- Commits: plain sentence messages in the repo's style (`feat: …`, `docs: …`), no Co-Authored-By or other trailers.- Files in this checkout have CRLF line endings (`core.autocrlf=true`). Scripts keep each file's own line endings.- `demo-page.css` changes, so `demo-page.css?v=7` and `demo-page.js?v=7` become `?v=8` on all 166 pages, and the home@@ -37,7 +37,7 @@ Spec: `docs/superpowers/specs/2026-10-12-star-button-design.md`.### Task 1: Star link and star row on every animation page-> Changed after the task review (owner's choice, 2026-10-12): below 1061px the Star link is a round star with no words, and its `hb-star-more` span is gone. The steps below are as they were first run; the spec holds the change.+> Changed after the task review (owner's choice, 2026-10-12): below 1061px the Star link is a round star with no words, and its `hb-star-more` span is gone; after the final review, below 820px it is left out of the top bar (the `max-width:819px` block, not the phone block, hides it). The steps below are as they were first run; the spec holds the change.**Files:**- Modify: `assets/css/demo-page.css` (top bar rules near line 39, prompt step rules near line 156, the hover block at@@ -280,6 +280,8 @@ deleted); the commit succeeds.### Task 2: Round star on the home page for phones+> Run in a worktree of its own (branch `feat/star-home`, merged into `feat/star-button`): its test went at the end of `tests/pages.test.js`, not after Task 1's tests, whose titles changed in Task 1's fix round. After the final review the test also pins how the round star fits (44px wide, the word hidden from sight, the count gone).+**Files:**- Modify: `index.html` (the GitHub button's markup near line 1449; the phone rule near line 273; the rule near line 324)- Modify: `CHANGELOG.md` (a new "Unreleased" heading at the top)diff --git a/docs/superpowers/specs/2026-10-12-star-button-design.md b/docs/superpowers/specs/2026-10-12-star-button-design.mdindex 7414a060..63e00146 100644--- a/docs/superpowers/specs/2026-10-12-star-button-design.md+++ b/docs/superpowers/specs/2026-10-12-star-button-design.md@@ -13,13 +13,15 @@ A pill at the right end of `nav.hb-bar`, after `span.hb-pager`, the same on ever```- `demo-page.css`: the pager gets `margin-left:auto`, so the pager and the pill sit together at the right. The pill has a- 1px `--hb-edge` border, fully round corners, 14px side padding and `--hb-soft` text; on hover (`@media(hover:hover)`)- the border turns `--hb-edge-2` and the text `--hb-ink`. It keeps the bar's 44px link height.-- Computers (from 1061px) read "Star on GitHub". From 601px to 1060px (tablets, phones held sideways, small laptop- windows) it is a round 44px star with no words, like the home page's on phones, so the page names keep their room;- its `aria-label` still names it. Phones (600px and less) hide it: B covers them. (Changed after the task review: the- word "Star" alone still cut page names on tablets, and the full label cut them at 1025–1060px; the owner chose the- round star.)+ 1px `--hb-edge` border, fully round corners, 14px side padding (none on the round star) and `--hb-soft` text; on hover+ (`@media(hover:hover)`) the border turns `--hb-edge-2` and the text `--hb-ink`. It keeps the bar's 44px link height.+- Computers (from 1061px) read "Star on GitHub". From 820px to 1060px (tablets, larger phones held sideways, small+ laptop windows) it is a round 44px star with no words, like the home page's on phones; its `aria-label` still names+ it. Below 820px (phones, small tablets in portrait, narrow windows) the top bar leaves it out, so the page names keep+ their room: B covers those screens. (Changed after the task review: the word "Star" alone still cut page names on+ tablets, and the full label cut them at 1025–1060px, so the owner chose the round star. Changed again after the final+ review: from 601px to 819px even the round star cut page names on up to 60 of the 166 pages, so the owner moved the+ cut-off from 601px to 820px.)- The star is the same outline star as the home page's GitHub button.## B · Under Copy prompt on every animation pagediff --git a/index.html b/index.htmlindex 4094ce82..4028f179 100644--- a/index.html+++ b/index.html@@ -323,7 +323,7 @@ button,input{font:inherit;color:inherit}/* beyond the design: widths and places it does not show */@media(max-width:760px){.gh{position:relative;width:44px;padding:0;justify-content:center;gap:0}.gh-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.gh-c{display:none}} /* from 760px down the GitHub button is a round star beside the dark-mode button: the word is still read out, the count goes */@media(min-width:601px) and (max-width:620px){.top .nav .lnk{padding:0 11px}} /* at 601px "Browse all" and "How it works" are there too: a little less padding makes room for the star */-@media(max-width:359px){.gh{display:none}} /* below 360px there is no room for it beside the dark-mode button */+@media(max-width:359px){.gh{display:none}} /* below 360px it is left out: it would still fit down to about 330px, not at 320px, so 360px keeps a margin */@media(max-width:1238px){.fl2,.fl5{display:none}} /* the two shapes that would crowd the 720px search box below 1239px */.acts{flex-wrap:wrap} /* a narrow card puts Try it under Copy prompt */#q{text-overflow:ellipsis} /* a placeholder that does not fit ends in an ellipsis, not cut by the button */diff --git a/tests/pages.test.js b/tests/pages.test.jsindex bf55770b..c6643dc1 100644--- a/tests/pages.test.js+++ b/tests/pages.test.js@@ -479,16 +479,19 @@ test('every guided-steps page asks for a star at the end of its top bar and undeassert.deepEqual(wrong, [], 'pages without the Star link right after the pager, or without the star row right after the prompt card');});-test('the shared stylesheet makes the Star link a round star below 1061px and leaves it to the star row on phones', () => {+test('the shared stylesheet makes the Star link a round star from 820px to 1060px and leaves it to the star row below 820px', () => {const css = read(path.join(ROOT, 'assets/css/demo-page.css')).replace(/\/\*[\s\S]*?\*\//g, '');const sets = (rules, selector, declaration) => rules.some(rule => rule.selector.split(',').some(part => part.trim() === selector) &&rule.body.split(';').some(d => d.replace(/\s+/g, '') === declaration));const within = media => cssRules(between(css, `@media(${media}){`, '\n}'));assert.ok(sets(cssRules(css), '.hb-bar .hb-pager', 'margin-left:auto'), 'the pager sits beside the Star link, at the right end');assert.ok(sets(cssRules(css), '.hb-bar .hb-star', 'box-sizing:border-box'), 'the Star link is 44px high whatever the demo sets');- assert.ok(sets(within('max-width:1060px'), '.hb-bar .hb-star', 'width:44px'), 'below 1061px the Star link is a 44px round star');+ assert.ok(sets(within('max-width:1060px'), '.hb-bar .hb-star', 'width:44px'), 'from 820px to 1060px the Star link is a 44px round star');assert.ok(sets(within('max-width:1060px'), '.hb-bar .hb-star>span', 'display:none'), 'with no words');- assert.ok(sets(within('max-width:600px'), '.hb-bar .hb-star', 'display:none'), 'phones leave the Star link out of the top bar');+ const hiding = cssRules(css).filter(rule => rule.selector.split(',').some(part => part.trim() === '.hb-bar .hb-star') &&+ rule.body.split(';').some(d => d.replace(/\s+/g, '') === 'display:none'));+ assert.equal(hiding.length, 1, 'one rule takes the Star link out of the top bar');+ assert.ok(sets(within('max-width:819px'), '.hb-bar .hb-star', 'display:none'), 'and it is for screens under 820px, where the star row asks instead');});const sharedRules = cssRules(read(path.join(ROOT, 'assets/css/demo-page.css')));@@ -843,4 +846,12 @@ test('the home page keeps its GitHub button on phones as a round star, and leave/(^|;)\s*display:\s*none/.test(rule.body));assert.equal(hiding.length, 1, 'one rule hides the GitHub button');assert.equal(count(HOME, '@media(max-width:359px){.gh{display:none}}'), 1, 'and it is for screens under 360px');+ const round = cssRules(between(css, '@media(max-width:760px){', '}}') + '}');+ const has = (selector, declarations) => round.some(rule => rule.selector === selector &&+ declarations.every(want => rule.body.split(';').some(d => d.replace(/\s+/g, '') === want)));+ assert.ok(has('.gh', ['width:44px', 'padding:0']), 'from 760px down the GitHub button is a 44px round star');+ assert.ok(has('.gh-t', ['position:absolute', 'width:1px', 'height:1px', 'overflow:hidden']), 'its word is hidden from sight and still read out');+ assert.ok(has('.gh-c', ['display:none']), 'and the star count goes');+ assert.ok(cssRules(between(css, '@media(min-width:601px) and (max-width:620px){', '}}') + '}').some(rule => rule.selector === '.top .nav .lnk'),+ 'from 601px to 620px the two text links make room for it');});