settings.css
| 1 | @keyframes react-loading-skeleton { |
| 2 | 100% { |
| 3 | transform: translateX(100%); |
| 4 | } |
| 5 | } |
| 6 | |
| 7 | .react-loading-skeleton { |
| 8 | --base-color: #ebebeb; |
| 9 | --highlight-color: #f5f5f5; |
| 10 | --animation-duration: 1.5s; |
| 11 | --animation-direction: normal; |
| 12 | --pseudo-element-display: block; /* Enable animation */ |
| 13 | |
| 14 | background-color: var(--base-color); |
| 15 | |
| 16 | width: 100%; |
| 17 | border-radius: 0.25rem; |
| 18 | display: inline-flex; |
| 19 | line-height: 1; |
| 20 | |
| 21 | position: relative; |
| 22 | -webkit-user-select: none; |
| 23 | -moz-user-select: none; |
| 24 | user-select: none; |
| 25 | overflow: hidden; |
| 26 | } |
| 27 | |
| 28 | .react-loading-skeleton::after { |
| 29 | content: ' '; |
| 30 | display: var(--pseudo-element-display); |
| 31 | position: absolute; |
| 32 | top: 0; |
| 33 | left: 0; |
| 34 | right: 0; |
| 35 | height: 100%; |
| 36 | background-repeat: no-repeat; |
| 37 | background-image: linear-gradient( |
| 38 | 90deg, |
| 39 | var(--base-color), |
| 40 | var(--highlight-color), |
| 41 | var(--base-color) |
| 42 | ); |
| 43 | transform: translateX(-100%); |
| 44 | |
| 45 | animation-name: react-loading-skeleton; |
| 46 | animation-direction: var(--animation-direction); |
| 47 | animation-duration: var(--animation-duration); |
| 48 | animation-timing-function: ease-in-out; |
| 49 | animation-iteration-count: infinite; |
| 50 | } |
| 51 | |
| 52 | @media (prefers-reduced-motion) { |
| 53 | .react-loading-skeleton { |
| 54 | --pseudo-element-display: none; /* Disable animation */ |
| 55 | } |
| 56 | } |
| 57 | |
| 58 |