Components
48
Background Gradients Breadcrumb Content Card Carousel Content Card Grid Content Cards Two Column Content Contact Form Content Contact Form Reveal Content Courses Map Content Courses Search Content Event Details Content Events Carousel Content Faqs Content Featured Cards Content Featured Products Content Featured Products Carousel Content Form Over Image Content Game Elements Content Hall Of Fame Carousel Content Horizontal Accordion Content Horizontal Scrolling Content How To Find Us Content Job Roles Grid Content Map Embed Content Marquee Text Content Media Carousel Content Players Content Quick Links Content Quote Over Image Content Simple Text And Image Variations Content Specification Content Stat Row Content Stat With Images And Content Content Text And Cards Grid Content Text And Image Variations Content Text Columns Content Text Image Carousel Content Text Over Image Content Title Content Useful Links Content Vacancies Grid Cookie Table Example Hero Basic Hero Featured Card Hero Game Hero Video And Carousel Hero Video Cards Playlist Hero Video Player

Content Marquee Text

There are no ACF fields assigned to this component.

				
@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/mixins";
@import "../../resources/scss/vendor/bootstrap/vendor/rfs";

.wp-block-group {
	--bg-color: #{$primary};

	.block-marquee-text {
		&.bg--primary,
		&.bg--secondary {
			--bg-color: #{$white};
		}

		&:after {
			width: 80%;
			max-width: rem-calc(1420);
			height: 1px;
			content: '';
			background-color: var(--bg-color);
			position: absolute;
			bottom: 0;
			left: 50%;
			pointer-events: none;
			transform: translate3d(-50%,0,0);
		}
	}
}

.block-marquee-text {
	width: 100%;
	position: relative;
	overflow: hidden;

	--gap: 4rem;
	position: relative;
	display: flex;
	overflow: hidden;
	gap: var(--gap);

	&:not([class*=pad-]) {
		@include padding( rem-calc(24 0) );
	}

	&.inview,
	&.aos-animate {
		.content-container {
			animation: marquee 12s linear infinite;

			.left-to-right & {
				background-color: red;
			}
		}
	}

	&.left-to-right {
		&.inview,
		&.aos-animate {
			.content-container {
				animation: marquee 12s linear infinite;
				animation-direction: reverse;
			}

			&:hover {
				.content-container {
					animation-play-state: paused;
				}
			}
		}
	}

	&:hover {
		.content-container {
			animation-play-state: paused;
		}
	}

	.content-container {
		flex-shrink: 0;
		display: flex;
		justify-content: space-around;
		gap: var(--gap);
		min-width: 100%;
	}

	p {
		margin-bottom: 0;
		font-weight: 800;
		text-transform: uppercase;
		line-height: 1;
		white-space: nowrap;
		@include fluid-type(48, 140);
	}
}

@keyframes marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(calc(-100% - var(--gap)));
	}
}

.site-footer {
	.block-marquee-text {
		//
	}
}
There are is no JavaScript file with this component.
This component is not currently used on any pages.
  • The content typed in is cloned so that we have a looping carousel
  • Options to control the colour of the text

Animation:

  • Whilst in view, the text will autoplay on a constant loop