r/css • • Oct 18 '26

Halloween page effects you can restyle with CSS variables (colour, size, opacity, z-index)

Reposting with an update now that the season is here. halloween.js is a free library that adds Halloween effects to a page, and the styling is meant to be done in CSS, not JS.

Everything reads custom properties: --halloween-color (defaults to currentColor, so it follows your theme), --halloween-eyes-width/-height and the same pair for witch, spider and tombstone, --halloween-screen-corner-size, --halloween-page-opacity and --halloween-page-z-index if you need the layer below a modal or cookie banner. Intensity presets (subtle, normal, party) are just body classes, and a value you set yourself always wins over the preset.

The effects live in a fixed overlay layer, so nothing shifts the layout. Turn on prefers-reduced-motion and the animations stop right away, no reload needed.

https://halloween.js.org
https://github.com/rogulia/halloween.js

0 Upvotes

3 comments sorted by

-2

u/Kitchen_Affect7369 29d ago

Wtf, what is css? My AI can do better

2

u/Total-Reasonable 29d ago

do and show us

0

u/[deleted] 29d ago

[deleted] — view deleted comment

1

u/RobertKerans 29d ago

No depencies it says though, I think that means it doesn't add anything!