Skip to content

Commit 906e7ef

Browse files
committed
fix all examples for touch devices
1 parent 0039fc3 commit 906e7ef

File tree

28 files changed

+107
-45
lines changed

28 files changed

+107
-45
lines changed

docs/.vitepress/components/v2/Examples/Activation/ActivationItem.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@
7878
font-weight: 500;
7979
font-size: 0.875rem;
8080
cursor: grab;
81-
user-select: none;
82-
touch-action: none;
8381
text-align: center;
8482
transition: opacity 0.15s;
83+
84+
/* See Mobile & Touch section */
85+
touch-action: none;
86+
user-select: none;
8587
}
8688
8789
.activation-item:active {

docs/.vitepress/components/v2/Examples/Animation/AnimatedCard.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
background: color-mix(in srgb, var(--card-color) 10%, var(--vp-c-bg));
6969
border: 1px solid color-mix(in srgb, var(--card-color) 25%, transparent);
7070
cursor: grab;
71-
user-select: none;
72-
touch-action: none;
7371
transition: opacity 0.15s ease;
7472
}
7573
@@ -85,6 +83,10 @@
8583
color: color-mix(in srgb, var(--card-color) 60%, transparent);
8684
font-size: 1.1rem;
8785
flex-shrink: 0;
86+
87+
/* See Mobile & Touch section */
88+
touch-action: none;
89+
user-select: none;
8890
}
8991
9092
.emoji {

docs/.vitepress/components/v2/Examples/AutoScroll/SortItem.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@
5656
font-weight: 500;
5757
font-size: 0.875rem;
5858
cursor: move;
59-
user-select: none;
60-
touch-action: none;
6159
display: flex;
6260
align-items: center;
61+
62+
/* See Mobile & Touch section */
63+
touch-action: none;
64+
user-select: none;
6365
}
6466
6567
.sort-item.is-dragging {

docs/.vitepress/components/v2/Examples/BaseDrop/DraggableItem.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
user-select: none;
3939
font-weight: 500;
4040
display: inline-block;
41+
42+
/* See Mobile & Touch section */
43+
touch-action: none;
44+
user-select: none;
4145
}
4246
4347
.draggable-item:active {

docs/.vitepress/components/v2/Examples/Checkers/CheckerPiece.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@
4242
display: flex;
4343
align-items: center;
4444
justify-content: center;
45-
user-select: none;
46-
touch-action: none;
4745
position: relative;
4846
transition:
4947
transform 0.08s ease,
5048
opacity 0.2s ease;
49+
50+
/* See Mobile & Touch section */
51+
touch-action: none;
52+
user-select: none;
5153
}
5254
5355
.piece:not(.ghost):hover {

docs/.vitepress/components/v2/Examples/Chess/ChessPiece.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@
4040
justify-content: center;
4141
font-size: 2.2rem;
4242
cursor: grab;
43-
user-select: none;
44-
touch-action: none;
4543
transition:
4644
opacity 0.15s ease,
4745
transform 0.08s ease;
4846
position: relative;
4947
z-index: 1;
5048
line-height: 1;
49+
50+
/* See Mobile & Touch section */
51+
touch-action: none;
52+
user-select: none;
5153
}
5254
5355
.piece:not(.ghost):hover {

docs/.vitepress/components/v2/Examples/ConstraintArea/DragChip.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
color: var(--vp-c-bg);
2525
font-weight: 500;
2626
font-size: 0.875rem;
27-
user-select: none;
28-
touch-action: none;
2927
cursor: grab;
3028
display: inline-flex;
3129
align-items: center;
3230
gap: 0.375rem;
3331
width: fit-content;
32+
33+
/* See Mobile & Touch section */
34+
touch-action: none;
35+
user-select: none;
3436
}
3537
3638
.chip:active {

docs/.vitepress/components/v2/Examples/Copy/BlockItem.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@
7272
background: var(--vp-c-bg);
7373
border: 1px solid var(--vp-c-divider);
7474
cursor: grab;
75-
user-select: none;
76-
touch-action: none;
7775
transition:
7876
background 0.15s,
7977
border-color 0.15s,
8078
box-shadow 0.15s;
79+
80+
/* See Mobile & Touch section */
81+
touch-action: none;
82+
user-select: none;
8183
}
8284
8385
.block-item:active {

docs/.vitepress/components/v2/Examples/CustomOverlay/DraggableNote.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
font-size: 0.82rem;
4343
font-weight: 500;
4444
cursor: grab;
45+
46+
/* See Mobile & Touch section */
4547
touch-action: none;
4648
user-select: none;
4749
}

docs/.vitepress/components/v2/Examples/CustomOverlay/DraggableTask.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@
4747
border-radius: 8px;
4848
font-size: 0.875rem;
4949
cursor: grab;
50-
touch-action: none;
51-
user-select: none;
5250
background: rgba(59, 130, 246, 0.12);
5351
border: 1px solid rgba(59, 130, 246, 0.3);
5452
color: rgb(147, 197, 253);
53+
54+
/* See Mobile & Touch section */
55+
touch-action: none;
56+
user-select: none;
5557
}
5658
5759
.task:active { cursor: grabbing; }

0 commit comments

Comments
 (0)