Merge pull request #6332 from chezsmithy/fix-ellipsis-animation
fix: 🐛 Fix for the ellipsis animation part deux
This commit is contained in:
commit
caf7140b84
1 changed files with 13 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import styled from "styled-components";
|
||||
import styled, { keyframes } from "styled-components";
|
||||
import { varWithFallback } from "../styles/theme";
|
||||
|
||||
export const defaultBorderRadius = "5px";
|
||||
|
|
@ -197,30 +197,20 @@ export const CloseButton = styled.button`
|
|||
cursor: pointer;
|
||||
`;
|
||||
|
||||
const ellipsisAnimation = keyframes`
|
||||
0% { width: 0; }
|
||||
33% { width: 0.33em; }
|
||||
66% { width: 0.66em; }
|
||||
100% { width: 1em; }
|
||||
`;
|
||||
|
||||
export const AnimatedEllipsis = styled.span`
|
||||
&::after {
|
||||
content: ".";
|
||||
animation: ellipsis 2.5s infinite;
|
||||
animation-fill-mode: forwards;
|
||||
animation-play-state: running;
|
||||
will-change: content;
|
||||
content: "...";
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@keyframes ellipsis {
|
||||
0% {
|
||||
content: ".";
|
||||
}
|
||||
33% {
|
||||
content: "..";
|
||||
}
|
||||
66% {
|
||||
content: "...";
|
||||
}
|
||||
100% {
|
||||
content: ".";
|
||||
}
|
||||
overflow: hidden;
|
||||
vertical-align: bottom;
|
||||
animation: ${ellipsisAnimation} 2s infinite;
|
||||
width: 0;
|
||||
}
|
||||
`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue