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: on phones 720px tall or less Copy prompt stays at the end of the entry, so it never covers the stage

matinbf162d436f28
diff --git a/famous/index.html b/famous/index.html
index 74e6013e..d1374cb2 100644
--- a/famous/index.html
+++ b/famous/index.html
@@ -576,7 +576,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
.fx-dlg .fx-what a{padding-block:14px} /* a link inside a sentence: its touch area grows to 44px without moving the lines */
}
@media(max-width:600px){.fx-dlg .copy{box-shadow:0 0 0 12px var(--surface),0 -16px 16px 4px var(--surface)}} /* full width: the page's own color around it hides the text that scrolls past */
-@media(max-height:500px){.fx-dlg .copy{position:static;box-shadow:none}} /* a short window: the button stays at the end of the entry, where it cannot cover the stage */
+@media(max-height:720px){.fx-dlg .copy{position:static;box-shadow:none}} /* a short window (a phone of 720px or less, a phone held sideways): the button stays at the end of the entry, where it cannot cover the stage */
@media(max-width:760px){.fx-know{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.fx-dlg[open],.fx-dlg[open]::backdrop{animation:none}}
diff --git a/tests/famous.test.js b/tests/famous.test.js
index 90985859..479945dd 100644
--- a/tests/famous.test.js
+++ b/tests/famous.test.js
@@ -645,7 +645,7 @@ test('the pop-up is a rounded card in the page\'s surface and line colors, dimme
assert.match(rule(phone, '.fx-dlg .copy'), /position:sticky;bottom:\d+px/, "on phones the entry's own Copy prompt sticks to the bottom");
assert.match(rule(CSS_BLOCKS, '.fx-stage'), /height:clamp\(240px,calc\(100dvh - 420px\),420px\)/, 'Our version is 420px tall, less in a short window, so it and its player fit the first screen');
assert.match(rule(phone, '.fx-stage'), /height:min\(300px,calc\(100dvh - 140px\)\)/, 'and 300px on phones, less in a short window');
- assert.match(rule(inner('@media(max-height:500px)'), '.fx-dlg .copy'), /position:static/, 'in a short window Copy prompt does not stick (it would cover the stage)');
+ assert.match(rule(inner('@media(max-height:720px)'), '.fx-dlg .copy'), /position:static/, 'in a short window Copy prompt does not stick (it would cover the stage)');
assert.match(rule(CSS_BLOCKS, '.fx-stage'), /background:#08080a/, 'always dark');
});