forked from TahaSh/drag-to-reorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
80 lines (69 loc) · 1.32 KB
/
style.css
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
* {
box-sizing: border-box;
}
:root {
height: 100%;
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
background: #87a5b2;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
body {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.list {
display: flex;
flex-direction: column;
max-width: 500px;
width: 100%;
gap: 10px 0;
}
.list__item {
width: 100%;
background: white;
padding: 15px;
border-radius: 5px;
color: #001d29;
font-weight: 500;
font-size: 18px;
box-shadow: 0 4px 6px -1px #001d2910, 0 2px 4px -2px #001d2910;
display: flex;
align-items: center;
position: relative;
will-change: transform;
}
.drag-handle {
position: absolute;
right: 0;
width: 44px;
height: 44px;
display: flex;
justify-content: center;
align-items: center;
}
.drag-handle::after {
content: '⠿';
font-size: 25px;
color: #00000099;
}
.list__item.is-idle .drag-handle {
cursor: grab;
}
.list__item.is-idle {
transition: 0.25s ease transform;
}
.list__item.is-draggable,
.list__item.is-draggable .drag-handle {
cursor: grabbing;
}
.list__item.is-draggable {
z-index: 10;
}