github.com/angrybunnyman.com

Portrait of the Man as a...

Portrait of a Egg

Post Nutrition Label

  • Content Type: Text
  • Read Time: 10 min
  • Topics: HTML, CSS, JS, Easter Eggs
  • Mood: Devious

Some things shall not be seen.
Some things demand to be glimpsed. But only when the veil shifts.

I wanted a way for words on my blog to hide in plain sight, wearing the skin of the background itself, but then whisper out when the light flips to dark, or the dark to light. A ghost in the stylesheet. A revenant in Helvetica.

The method is simple: a CSS class that forces text to inherit the background color of the page as its text color. Then, when the theme changes, the text hesitates for a beat. It lingers in the wrong shade just long enough to reveal itself as a phosphor sparking within a dying bulb. Then fades into nothing.

Here’s the magic:

:root {
  --theme-reveal-delay: 1s;       /* How long the ghost lingers */
  --theme-reveal-duration: 0.6s;  /* How quickly it fades away */
}

.phosphor {
  color: var(--background-color) !important;
  transition: color var(--theme-reveal-duration, 0.6s) ease-in-out var(--theme-reveal-delay, 1s);
}

.phosphor a { 
  color: inherit !important; 
}

@media (prefers-reduced-motion: reduce) {
  .phosphor { transition: none;  /* always respect accessibility */}
}

Add the .phosphor class to any text element. Like so:

<p class="phosphor">this message flickers briefly into existence when you toggle themes</p>

this message flickers briefly into existence when you toggle themes

How It Works

This isn’t flashy animation. It’s a temporal glitch. A haunting. A way to let words live only in the seam between states. Hidden text wants to be read, and sometimes the reader may not be ready for what it says.

Use with caution.

Reply on Bluesky ⤤ Reply by Email (or just say hi!) Reply on Mastodon ⤤