forked from sunpietro/dragster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dragster.style.css
115 lines (99 loc) · 2.04 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
/*
* Dragster - drag'n'drop library v1.3.6
* https://github.com/sunpietro/dragster
*
* Copyright 2015-2016 Piotr Nalepa
* http://blog.piotrnalepa.pl
*
* Released under the MIT license
* https://github.com/sunpietro/dragster/blob/master/LICENSE
*
* Date: 2016-12-12T19:00Z
*/
* {
box-sizing: border-box;
}
body {
width: 100%;
max-width: 60rem;
margin: auto;
font: 100%/1.4 Arial, sans-serif;
text-align: center;
}
[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;
}
.regions {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.dragster-region {
flex: 1 1 30%;
outline: 1px solid blue;
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 red;
}
.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 5px 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: 2px solid #b30;
}