File tree Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Original file line number Diff line number Diff line change 1
1
import { styled , keyframes } from 'stitches.config.js' ;
2
2
3
3
const Component = ( ) => {
4
- return < Wrapper /> ;
4
+ return (
5
+ < Wrapper >
6
+ < span > </ span >
7
+ < span > </ span >
8
+ < span > </ span >
9
+ </ Wrapper >
10
+ ) ;
5
11
} ;
6
12
7
13
const flashing = keyframes ( {
8
- '0%' : { backgroundColor : '$white' } ,
9
- '50%, 100%' : {
10
- backgroundColor : 'rgba(255, 255, 255, 0.3)'
14
+ '0%' : {
15
+ opacity : 0.2
16
+ } ,
17
+ '20%' : {
18
+ opacity : 1
19
+ } ,
20
+ '100%' : {
21
+ opacity : 0.2
11
22
}
12
23
} ) ;
13
24
14
25
const Wrapper = styled ( 'div' , {
15
- position : 'relative' ,
16
- width : '14px' ,
17
- height : '14px' ,
18
- borderRadius : '50%' ,
19
- backgroundColor : '$white' ,
20
- color : '$white' ,
21
- animation : `${ flashing } 0.8s infinite linear alternate .4s` ,
22
-
23
- '&::after, &::before' : {
24
- content : '' ,
25
- display : 'inline-block' ,
26
- position : 'absolute' ,
27
- top : 0 ,
26
+ span : {
28
27
width : '14px' ,
29
28
height : '14px' ,
30
29
borderRadius : '50%' ,
31
30
backgroundColor : '$white' ,
32
- color : '$white'
31
+ animation : `${ flashing } 1.4s infinite linear` ,
32
+ margin : '0 4px' ,
33
+ display : 'inline-block'
33
34
} ,
34
- '&::before' : {
35
- left : '-21px' ,
36
- animation : ` ${ flashing } 0.8s infinite alternate`
35
+
36
+ 'span:nth-child(2)' : {
37
+ ' animation-delay' : '.2s'
37
38
} ,
38
39
39
- '&::after' : {
40
- left : '21px' ,
41
- animation : `${ flashing } 0.8s infinite alternate .8s`
40
+ 'span:nth-child(3)' : {
41
+ 'animation-delay' : '.4s'
42
42
}
43
43
} ) ;
44
44
You can’t perform that action at this time.
0 commit comments