
.flash {
    position: relative;
    width: fit-content;
    overflow: hidden;
}

/* The diagonal flash effect */
.flash::before {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 90px;
    height: 400%;

    background: linear-gradient(to right,
            rgba(255, 255, 255, 0.0) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.0) 100%);

    pointer-events: none;
    transform: rotate(45deg);
    transition: all 0.0s;
}

.flash.flash_on::before {
    left: 150%;
    transition: all 1.6s;
}