mogoh’s blog
something something technology

Flickering Light

A page that does exactly one thing: flicker, 50 times per second, forever. Probably the most annoying CSS I have ever written.

You can find the page here. (Epilepsy warning!)

body {
    background-color: black;
    animation: flicker 20ms infinite;
}

@keyframes flicker {
    from { background-color: black; }
    to { background-color: white; }
}

At 50 flashes per second it is far beyond what WCAG allows,[1] so the page switches itself off via prefers-reduced-motion: reduce.


  1. https://www.w3.org/WAI/WCAG22/Understanding/three-flashes-or-below-threshold.html ↩︎