|
1 | 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:400);
|
2 | 2 |
|
| 3 | +$focusedOutlineColor: #4c9ffe; |
| 4 | + |
3 | 5 | .root {
|
4 | 6 | display: flex;
|
5 | 7 | height: 100%;
|
|
21 | 23 | .item {
|
22 | 24 | position: relative;
|
23 | 25 | border-bottom: 1px solid #999;
|
| 26 | + |
| 27 | + cursor: grab; |
| 28 | + touch-action: manipulation; |
| 29 | + |
| 30 | + &.sorting { |
| 31 | + pointer-events: none; |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +.containsDragHandle { |
| 36 | + cursor: default; |
24 | 37 | }
|
25 | 38 |
|
26 | 39 | // Stylized
|
|
32 | 45 | border-radius: 3px;
|
33 | 46 | outline: none;
|
34 | 47 | }
|
| 48 | + |
35 | 49 | .stylizedItem {
|
36 | 50 | display: flex;
|
37 | 51 | align-items: center;
|
|
41 | 55 | border-bottom: 1px solid #efefef;
|
42 | 56 | box-sizing: border-box;
|
43 | 57 | user-select: none;
|
| 58 | + outline: none; |
44 | 59 |
|
45 | 60 | color: #333;
|
46 | 61 | font-weight: 400;
|
| 62 | + |
| 63 | + &:focus:not(.containsDragHandle) { |
| 64 | + text-indent: -2px; |
| 65 | + border: 2px solid $focusedOutlineColor; |
| 66 | + } |
47 | 67 | }
|
48 | 68 |
|
49 | 69 | .disabled {
|
|
52 | 72 | }
|
53 | 73 |
|
54 | 74 | // Drag handle
|
| 75 | +.handleWrapper { |
| 76 | + width: 18px; |
| 77 | + height: 18px; |
| 78 | + outline: none; |
| 79 | +} |
| 80 | + |
55 | 81 | .handle {
|
56 | 82 | display: block;
|
57 | 83 | width: 18px;
|
58 | 84 | height: 18px;
|
59 |
| - opacity: 0.25; |
60 | 85 | margin-right: 20px;
|
61 |
| - cursor: row-resize; |
| 86 | + overflow: hidden; |
| 87 | + |
| 88 | + > svg { |
| 89 | + opacity: 0.3; |
| 90 | + } |
| 91 | + |
| 92 | + cursor: grab; |
62 | 93 | }
|
63 | 94 |
|
64 | 95 | // Horizontal list
|
|
147 | 178 | .helper {
|
148 | 179 | box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.2),
|
149 | 180 | 0 -5px 5px -5px rgba(0, 0, 0, 0.2);
|
| 181 | + |
| 182 | + cursor: grabbing; |
150 | 183 | }
|
| 184 | + |
151 | 185 | .stylizedHelper {
|
152 |
| - box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.2), |
153 |
| - 0 -5px 5px -5px rgba(0, 0, 0, 0.2); |
154 |
| - background-color: rgba(255, 255, 255, 0.8); |
155 |
| - cursor: row-resize; |
| 186 | + border: 1px solid #efefef; |
| 187 | + box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.2); |
| 188 | + background-color: rgba(255, 255, 255, 0.9); |
| 189 | + border-radius: 3px; |
156 | 190 |
|
157 | 191 | &.horizontalItem {
|
158 | 192 | cursor: col-resize;
|
159 | 193 | }
|
| 194 | + |
160 | 195 | &.gridItem {
|
161 | 196 | background-color: transparent;
|
162 | 197 | white-space: nowrap;
|
163 | 198 | box-shadow: none;
|
| 199 | + border: none; |
164 | 200 |
|
165 | 201 | .wrapper {
|
166 |
| - background-color: rgba(255, 255, 255, 0.8); |
| 202 | + background-color: rgba(255, 255, 255, 0.9); |
167 | 203 | box-shadow: 0 0 7px rgba(0, 0, 0, 0.15);
|
168 | 204 | }
|
169 | 205 | }
|
| 206 | + |
| 207 | + &:focus { |
| 208 | + box-shadow: 0 0px 5px 1px $focusedOutlineColor; |
| 209 | + } |
170 | 210 | }
|
171 | 211 |
|
172 | 212 | .shrinkedHelper {
|
|
0 commit comments