Skip to content

Commit 101b92e

Browse files
authored
Merge pull request #2034 from Yopai/patch-1
Trick for emptyInsertThreshold
2 parents e294ab9 + 7d0c6a0 commit 101b92e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,19 @@ The distance (in pixels) the mouse must be from an empty sortable while dragging
521521

522522
Demo: https://jsbin.com/becavoj/edit?js,output
523523

524+
An alternative to this option would be to set a padding on your list when it is empty.
525+
526+
For example:
527+
```css
528+
ul:empty {
529+
padding-bottom: 20px;
530+
}
531+
```
532+
533+
Warning: For `:empty` to work, it must have no node inside (even text one).
534+
535+
Demo:
536+
https://jsbin.com/yunakeg/edit?html,css,js,output
524537

525538
---
526539
### Event object ([demo](https://jsbin.com/fogujiv/edit?js,output))

0 commit comments

Comments
 (0)