-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyled.tsx
More file actions
57 lines (51 loc) · 1.17 KB
/
Copy pathstyled.tsx
File metadata and controls
57 lines (51 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import _ from 'lodash';
import styled, { css } from 'styled-components';
export const Heading = styled.h3`
display: flex;
font-size: 18px;
font-weight: 500;
letter-spacing: 2px;
line-height: 1;
margin: 0 0 8px 0;
`;
export const List = styled.ul`
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
gap: 8px;
`;
export const ListItem = styled.li`
padding: 2px 8px;
position: relative;
&:before {
content: '';
background-color: var(--blue-500);
opacity: 0.05;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
transition: width 0.25s var(--ease);
}
& span {
display: inline-block;
transition:
opacity 0.25s var(--ease),
transform 0.25s var(--ease);
}
${_.range(1, 40).map(
(i) => css`
&:nth-child(${i}) {
&:before {
transition-delay: ${0.025 * i + 0.3}s;
}
& span {
transition-delay: ${0.025 * i + 0.35}s;
}
}
`,
)}
`;