bestelbus22@lemmy.world to Programmer Humor@programming.dev · 13 hours agoFor that modern web feelinglemmy.worldimagemessage-square14fedilinkarrow-up1233arrow-down13
arrow-up1230arrow-down1imageFor that modern web feelinglemmy.worldbestelbus22@lemmy.world to Programmer Humor@programming.dev · 13 hours agomessage-square14fedilink
minus-squaremikazuki@lemmy.worldlinkfedilinkarrow-up8·12 hours agoDon’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.
minus-squarebestelbus22@lemmy.worldOPlinkfedilinkarrow-up9·12 hours agonull will actually default back to the rules coming from CSS, I use this all over the place as a pattern
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·22 minutes agoBut if the element itself already had an inline opacity value, that would be lost. 🙂
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.
null will actually default back to the rules coming from CSS, I use this all over the place as a pattern
But if the element itself already had an inline opacity value, that would be lost. 🙂