| @@ -1,0 +1,74 @@ | ||
| 1 | +.king-addons-auto-scrolling-text { | |
| 2 | + word-wrap: normal; | |
| 3 | + word-break: break-word; | |
| 4 | + white-space: nowrap; | |
| 5 | +} | |
| 6 | + | |
| 7 | +.king-addons-auto-scrolling-text .king-addons-auto-scrolling-text-inner * { | |
| 8 | + margin: 0; | |
| 9 | + padding: 0; | |
| 10 | + word-wrap: normal; | |
| 11 | + word-break: keep-all; | |
| 12 | +} | |
| 13 | + | |
| 14 | +.king-addons-auto-scrolling-text-gradient .king-addons-auto-scrolling-text-inner { | |
| 15 | + -webkit-background-clip: text; | |
| 16 | + -webkit-text-fill-color: transparent; | |
| 17 | +} | |
| 18 | + | |
| 19 | +.king-addons-auto-scrolling-text img { | |
| 20 | + display: inline-block; | |
| 21 | +} | |
| 22 | + | |
| 23 | +.king-addons-auto-scrolling-text-underline-gradient .king-addons-auto-scrolling-text-inner { | |
| 24 | + position: relative; | |
| 25 | + transition: all 0.25s ease-in; | |
| 26 | +} | |
| 27 | + | |
| 28 | +.king-addons-auto-scrolling-text { | |
| 29 | + width: auto; | |
| 30 | + display: inline-block; | |
| 31 | +} | |
| 32 | + | |
| 33 | +.king-addons-auto-scrolling-text-items { | |
| 34 | + overflow: hidden; | |
| 35 | + white-space: nowrap; | |
| 36 | + box-sizing: border-box; | |
| 37 | + position: relative; | |
| 38 | +} | |
| 39 | + | |
| 40 | +.king-addons-auto-scrolling-text-wrapper { | |
| 41 | + display: flex; | |
| 42 | + width: max-content; | |
| 43 | + white-space: nowrap; | |
| 44 | + animation: king-addons-auto-scrolling-animation 20s linear infinite; | |
| 45 | + | |
| 46 | + /* Keep the track on its own compositor layer. Without this the browser can | |
| 47 | + promote and demote it around the animation and re-rasterize the text, | |
| 48 | + which shows up as an occasional hitch in an otherwise steady scroll. */ | |
| 49 | + will-change: transform; | |
| 50 | +} | |
| 51 | + | |
| 52 | +.king-addons-auto-scrolling-text-group { | |
| 53 | + flex: 0 0 auto; | |
| 54 | + white-space: nowrap; | |
| 55 | +} | |
| 56 | + | |
| 57 | +/* The shift is one copy of the content, so the next copy lands exactly where | |
| 58 | + this one started and the reset is invisible. The script sets the value once | |
| 59 | + it knows how many copies fit; -50% is the two-copy fallback. */ | |
| 60 | +@keyframes king-addons-auto-scrolling-animation { | |
| 61 | + 0% { transform: translateX(0); } | |
| 62 | + 100% { transform: translateX(var(--king-addons-marquee-shift, -50%)); } | |
| 63 | +} | |
| 64 | + | |
| 65 | +@media (prefers-reduced-motion: reduce) { | |
| 66 | + .king-addons-auto-scrolling-text-wrapper { | |
| 67 | + animation: none; | |
| 68 | + } | |
| 69 | +} | |
| 70 | + | |
| 71 | +.swiper-container:not(.swiper-container-initialized) > .swiper-wrapper, | |
| 72 | +.swiper:not(.swiper-initialized) > .swiper-wrapper { | |
| 73 | + overflow: visible !important; | |
| 74 | +} | |