At the top of my screen, I have a message box banner styled as follows (I'm using React + Material UI):
style={{
display: "flex",
flexDirection: "row",
justifyContent: "flex-start",
textAlign: "left",
flexGrow: 1,
overflow: "hidden",
height: "100%",
}}
The child components feature the following animation:
"scroll-text": {
width: "80%",
animation: `$marquee ${value}s linear infinite`,
animationPlayState: "running",
"&:hover": {
animationPlayState: "paused",
},
"&focus-within": {
animationPlayState: "paused",
},
},
"@keyframes marquee": {
"0%": { transform: "translateX(0);" },
"100%": { transform: "translateX(-100%);" },
},
The animation runs smoothly. However, when the number of child components exceeds the container's width, the new components may appear partially cut off or not at all (refer to the image link below for an example). https://i.sstatic.net/3iXSj.png