bestelbus22@lemmy.world to Programmer Humor@programming.dev · 27 days agoFor that modern web feelinglemmy.worldimagemessage-square36linkfedilinkarrow-up1293arrow-down13
arrow-up1290arrow-down1imageFor that modern web feelinglemmy.worldbestelbus22@lemmy.world to Programmer Humor@programming.dev · 27 days agomessage-square36linkfedilink
minus-squaremikazuki@lemmy.worldlinkfedilinkarrow-up9·27 days 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-up11·27 days 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·27 days 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. 🙂