Dock Magnify
Interactive & Advanced · Animated · pure CSS
The macOS dock fisheye applied to text: the hovered letter scales up the most, its neighbors swell on a falloff, and the two-away letters bulge a touch — all through pure :hover, adjacent-sibling and :has() previous-sibling selectors with no JavaScript. Letters grow up from the baseline with a springy overshoot, and a faint dotted rail hints at the interactivity at rest.
How it works
Dock Magnify is an animated interactive & advanced text effect rendered entirely in CSS. Each character is wrapped in its own span so it can animate independently — the HTML and JSX exports include that per-letter markup.
Controls
Dock Magnify exposes 4 dedicated controls — Hue, Magnify, Lift and Spread — on top of the shared type controls (font, weight, letter-spacing and case). Open it in the generator to tune every value live, then copy the updated CSS.
CSS
/* Dock Magnify — made with TEXT-FX · https://text-fx.app
* HTML: each character is wrapped in a <span> — see the HTML export.
* Font: 'Space Mono', monospace (load from Google Fonts).
*/
.text-effect {
font-family: 'Space Mono', monospace;
font-weight: 700;
letter-spacing: -2px;
text-transform: none;
}
.text-effect {
color: hsl(349 22% 84%);
white-space: pre;
cursor: pointer;
width: fit-content;
margin-inline: auto;
padding-bottom: 8px;
background-image: radial-gradient(circle, hsl(349 45% 58% / 0.5) 0 1.1px, transparent 1.7px);
background-size: 10px 10px;
background-repeat: repeat-x;
background-position: left bottom;
}
.text-effect .fx-ch {
display: inline-block;
position: relative;
transform-origin: bottom center;
transition: scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, text-shadow 0.3s ease;
}
.text-effect .fx-ch:hover {
scale: 1.45;
color: hsl(349 80% 70%);
z-index: 3;
text-shadow: 0 8px 12px hsl(349 40% 5% / 0.32);
}
.text-effect .fx-ch:hover + .fx-ch,
.text-effect .fx-ch:has(+ .fx-ch:hover) {
scale: 1.248;
z-index: 2;
text-shadow: 0 4px 8.8px hsl(349 40% 5% / 0.32);
}
.text-effect .fx-ch:hover + .fx-ch + .fx-ch,
.text-effect .fx-ch:has(+ .fx-ch + .fx-ch:hover) {
scale: 1.099;
z-index: 1;
}
HTML
This effect needs the markup below (per-letter spans, SVG defs, or a data-text attribute).
<!-- Made with TEXT-FX · https://text-fx.app -->
<style>
.text-effect {
font-family: 'Space Mono', monospace;
font-weight: 700;
letter-spacing: -2px;
text-transform: none;
}
.text-effect {
color: hsl(349 22% 84%);
white-space: pre;
cursor: pointer;
width: fit-content;
margin-inline: auto;
padding-bottom: 8px;
background-image: radial-gradient(circle, hsl(349 45% 58% / 0.5) 0 1.1px, transparent 1.7px);
background-size: 10px 10px;
background-repeat: repeat-x;
background-position: left bottom;
}
.text-effect .fx-ch {
display: inline-block;
position: relative;
transform-origin: bottom center;
transition: scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, text-shadow 0.3s ease;
}
.text-effect .fx-ch:hover {
scale: 1.45;
color: hsl(349 80% 70%);
z-index: 3;
text-shadow: 0 8px 12px hsl(349 40% 5% / 0.32);
}
.text-effect .fx-ch:hover + .fx-ch,
.text-effect .fx-ch:has(+ .fx-ch:hover) {
scale: 1.248;
z-index: 2;
text-shadow: 0 4px 8.8px hsl(349 40% 5% / 0.32);
}
.text-effect .fx-ch:hover + .fx-ch + .fx-ch,
.text-effect .fx-ch:has(+ .fx-ch + .fx-ch:hover) {
scale: 1.099;
z-index: 1;
}
</style>
<div class="text-effect"><span class="fx-ch" style="--i:0;--n:9;--rev:8;--mid:4">Y</span><span class="fx-ch" style="--i:1;--n:9;--rev:7;--mid:4">o</span><span class="fx-ch" style="--i:2;--n:9;--rev:6;--mid:4">u</span><span class="fx-ch" style="--i:3;--n:9;--rev:5;--mid:4">r</span><span class="fx-ch" style="--i:4;--n:9;--rev:4;--mid:4"> </span><span class="fx-ch" style="--i:5;--n:9;--rev:3;--mid:4">t</span><span class="fx-ch" style="--i:6;--n:9;--rev:2;--mid:4">e</span><span class="fx-ch" style="--i:7;--n:9;--rev:1;--mid:4">x</span><span class="fx-ch" style="--i:8;--n:9;--rev:0;--mid:4">t</span></div>
- Category
- Interactive & Advanced
- Type
- Animated
- Browser support
- macOS-dock fisheye on :hover via :has() + sibling selectors (all modern browsers) — resting preview is plain text.
- Capabilities
- perLetter