frontblocks-headline-marquee.js
4 months ago
frontblocks-headline-option.jsx
1 month ago
frontblocks-headline.css
4 months ago
frontblocks-headline.js
1 month ago
frontblocks-headline.css
98 lines
| 1 | .gb-line-effect-vertical, |
| 2 | .gb-line-effect-horizontal { |
| 3 | position: relative; |
| 4 | display: block; |
| 5 | width: fit-content; |
| 6 | } |
| 7 | |
| 8 | .gb-line-effect-vertical { |
| 9 | display: flex; |
| 10 | align-items: center; |
| 11 | padding-right: 20px; |
| 12 | } |
| 13 | |
| 14 | .gb-line-effect-vertical::after { |
| 15 | content: ""; |
| 16 | position: absolute; |
| 17 | top: 50%; |
| 18 | transform: translateY(-50%); |
| 19 | right: 0; |
| 20 | width: 3px; |
| 21 | height: 100%; |
| 22 | background-color: black; |
| 23 | } |
| 24 | |
| 25 | .gb-line-effect-horizontal { |
| 26 | display: flex; |
| 27 | align-items: center; |
| 28 | padding-right: 40px; |
| 29 | } |
| 30 | |
| 31 | .gb-line-effect-horizontal::after { |
| 32 | content: ""; |
| 33 | position: absolute; |
| 34 | right: 0; |
| 35 | bottom: 50%; |
| 36 | transform: translateY(50%); |
| 37 | width: 20px; |
| 38 | height: 3px; |
| 39 | background-color: black; |
| 40 | } |
| 41 | |
| 42 | /* Infinite Scrolling Marquee Effect */ |
| 43 | .gb-marquee-infinite-scroll { |
| 44 | overflow: hidden; |
| 45 | white-space: nowrap; |
| 46 | position: relative; |
| 47 | width: 100%; |
| 48 | max-width: 100%; |
| 49 | display: block; |
| 50 | } |
| 51 | |
| 52 | /* Marquee wrapper created by JavaScript */ |
| 53 | .gb-marquee-infinite-scroll .gb-marquee-wrapper { |
| 54 | display: flex; |
| 55 | white-space: nowrap; |
| 56 | will-change: transform; |
| 57 | backface-visibility: hidden; |
| 58 | -webkit-backface-visibility: hidden; |
| 59 | transform: translateZ(0); |
| 60 | -webkit-transform: translateZ(0); |
| 61 | width: auto; |
| 62 | min-width: 100%; |
| 63 | animation-iteration-count: infinite; |
| 64 | animation-fill-mode: none; |
| 65 | } |
| 66 | |
| 67 | /* Individual copies of content */ |
| 68 | .gb-marquee-infinite-scroll .gb-marquee-copy { |
| 69 | display: inline-block; |
| 70 | white-space: nowrap; |
| 71 | padding-right: 2em; |
| 72 | flex-shrink: 0; |
| 73 | backface-visibility: hidden; |
| 74 | -webkit-backface-visibility: hidden; |
| 75 | } |
| 76 | |
| 77 | /* Base animation - will be overridden by inline styles for dynamic copies */ |
| 78 | @keyframes marquee-scroll { |
| 79 | 0% { |
| 80 | transform: translateX(0) translateZ(0); |
| 81 | } |
| 82 | 100% { |
| 83 | transform: translateX(-50%) translateZ(0); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /* Ensure all text content doesn't break */ |
| 88 | .gb-marquee-infinite-scroll * { |
| 89 | white-space: nowrap !important; |
| 90 | } |
| 91 | |
| 92 | /* Smooth transition for better performance */ |
| 93 | .gb-marquee-infinite-scroll, |
| 94 | .gb-marquee-infinite-scroll .gb-marquee-wrapper, |
| 95 | .gb-marquee-infinite-scroll .gb-marquee-copy { |
| 96 | -webkit-font-smoothing: antialiased; |
| 97 | -moz-osx-font-smoothing: grayscale; |
| 98 | } |