stacker.news/styles/dnd.module.css
ekzyis 1dc4018a3c
Use touch-action: pan-y to fix DnD vs scroll (#2350)
* Fix handleTouchMove not handling leaving elements

* Fix DnD vs scroll on mobile
2025-07-28 17:11:21 -05:00

31 lines
532 B
CSS

.draggable {
cursor: grab;
transition: all 0.2s ease-out;
position: relative;
}
.dragging {
cursor: grabbing;
opacity: 0.3;
z-index: 1000;
}
.dragOver {
transform: scale(1.03);
box-shadow: 0 0 10px var(--bs-info);
}
@media (max-width: 768px) {
.draggable {
/* https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action */
touch-action: pan-y;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.dragging {
touch-action: none;
}
}