@mixin white-gradient { background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%); } // Animation duration $animation-speed: 40s; // Keyframes for infinite scroll animation @keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 7)); // Adjust based on number of slides } } // Slider container styling .slider { background: white; box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.125); height: 100px; overflow: hidden; position: relative; width: 960px; // Adjust width as needed margin: auto; // Gradient fade effect on left and right edges &::before, &::after { @include white-gradient; content: ""; height: 100px; position: absolute; width: 200px; z-index: 2; } &::before { left: 0; top: 0; } &::after { right: 0; top: 0; transform: rotate(180deg); // Flip gradient for right edge } // Slide track containing all slides .slide-track { animation: scroll $animation-speed linear infinite; // Continuous scroll display: flex; width: calc(250px * 14); // Adjust based on total slides } // Individual slides .slide { height: 100px; width: 250px; // Slide width } }