Skip to content

Instantly share code, notes, and snippets.

@Arkkimaagi
Arkkimaagi / follow-focus.css
Created March 7, 2026 06:56
Pure css animated follow focus for tabbing on a website
:focus-visible{
anchor-name: --focus;
}
body:focus-within::before {
content: "";
position: absolute;
border-radius: 100vmax;
top: calc(anchor(--focus center) - 10px);
left: calc(anchor(--focus center) - 10px);
width: 20px;
Enabled*
Blocked --> Disabled
Default*
Unhovered*
Hover --> Hovered
Unfocused Unhovered*
Focus --> Focused Unhovered
### Keybase proof
I hereby claim:
* I am arkkimaagi on github.
* I am arkkimaagi (https://keybase.io/arkkimaagi) on keybase.
* I have a public key whose fingerprint is D258 B446 3988 F825 AC03 67C7 51F3 A967 FA6C 7304
To claim this, I am signing this object: