381
you are viewing a single comment's thread
view the rest of the comments
[-] mikazuki@lemmy.world 10 points 3 weeks ago

Donโ€™t just override opacity with null , it will override whatever the original style was. Before setting to 30% you need to store the original value and restore that in the timeout.

[-] bestelbus22@lemmy.world 14 points 3 weeks ago

null will actually default back to the rules coming from CSS, I use this all over the place as a pattern

[-] victorz@lemmy.world 2 points 3 weeks ago

But if the element itself already had an inline opacity value, that would be lost. ๐Ÿ™‚

[-] bestelbus22@lemmy.world 2 points 3 weeks ago

Yes very true, and also not likely at all ;)

[-] victorz@lemmy.world 2 points 3 weeks ago

Not in your code perhaps, which is a good thing ๐Ÿ‘

this post was submitted on 21 Jan 2026
381 points (99.2% liked)

Programmer Humor

29742 readers
1151 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS