• mikazuki@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    12 hours 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.worldOP
      link
      fedilink
      arrow-up
      9
      ·
      12 hours ago

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

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        22 minutes ago

        But if the element itself already had an inline opacity value, that would be lost. 🙂