-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
dragster.style.css
129 lines (110 loc) · 2.36 KB
/
dragster.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*@preserve
* Dragster - drag'n'drop library v1.6.2
* https://github.com/sunpietro/dragster
*
* Copyright 2015-2017 Piotr Nalepa
* http://blog.piotrnalepa.pl
*
* Released under the MIT license
* https://github.com/sunpietro/dragster/blob/master/LICENSE
*
* Date: 2017-06-28T22:30Z
*/
*, *:after, *:before {
box-sizing: border-box;
}
html {
font-size: 16px;
}
body {
width: 100%;
max-width: 80vw;
margin: auto;
font-size: 1rem;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
text-align: center;
line-height: 1.4;
}
[draggable] {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-khtml-user-drag: element;
-webkit-user-drag: element;
}
#container-0 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
}
#container-1 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
.dragster-region {
outline: 1px solid #8d5;
padding: 1rem;
vertical-align: top;
min-height: 3rem;
transition: height .3s cubic-bezier(.4, 0, .2, 1);
margin: 1rem;
}
.dragster-region + .dragster-region {
outline: 1px solid #b30;
}
.dragster-draggable {
position: relative;
z-index: 1;
cursor: pointer;
}
.dragster-draggable + .dragster-draggable {
margin-top: 1rem;
}
.dragster-draggable.is-dragging {
cursor: move;
}
.dragster-temp {
pointer-events: none;
z-index: 10;
top: 0;
left: 0;
cursor: move;
opacity: 1;
box-shadow: 0 0 .25rem 0 rgba(0,0,0,.5);
transition:
opacity .3s cubic-bezier(.4, 0, .2, 1),
box-shadow .3s cubic-bezier(.4, 0, .2, 1);
}
.dragster-block {
background: #eee;
padding: .5rem;
opacity: 1;
}
.dragster-block svg {
width: 100%;
}
.dragster-draggable.is-dragging > * {
opacity: 0.5;
}
.dragster-drop-placeholder {
height: 2rem;
border: 1px dashed #000;
}
.dragster-block + .dragster-drop-placeholder,
.dragster-drop-placeholder + .dragster-block {
margin-top: .5rem;
}
.dragster-is-hidden,
.dragster-temp.dragster-is-hidden {
opacity: 0;
box-shadow: none;
}
.dragster-draggable.dragster-replacable {
outline: .125rem solid #b30;
}
.dragster-block .dragster-block {
background: #ddd;
}