-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-touch-ux.css
More file actions
103 lines (93 loc) · 2.31 KB
/
admin-touch-ux.css
File metadata and controls
103 lines (93 loc) · 2.31 KB
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
/**
* Admin Touch UX — Touch-specific CSS enhancements.
*
* Only effective when the .admin-touch-ux class is added to <html>
* by the JS (touch device detected). This ensures zero impact on
* desktop/mouse users.
*
* @since 1.0.0
* @package AdminTouchUX
*/
/*
* 1. Enlarge touch targets to meet WCAG 2.1 SC 2.5.5 (44x44px).
* Row action links (Edit | Quick Edit | Trash) in list tables
* are notoriously small on touch devices.
*/
/*
* Row actions: only on wide screens to avoid horizontal overflow on phones.
* On narrow screens (≤782px), WP already shows row actions inline.
*/
@media screen and (min-width: 783px) {
.admin-touch-ux .row-actions span a,
.admin-touch-ux .row-actions span button {
display: inline-block;
min-height: 44px;
line-height: 44px;
padding: 0 8px;
}
.admin-touch-ux tr .row-actions {
position: static !important;
visibility: visible !important;
}
}
/* Prevent horizontal scroll caused by touch enhancements. */
.admin-touch-ux #wpwrap {
overflow-x: hidden;
}
/*
* 2. Admin menu collapse arrow — larger touch target.
*/
.admin-touch-ux #collapse-menu {
min-height: 44px;
display: flex;
align-items: center;
}
/*
* 3. Screen Options and Help tabs — larger touch target.
*/
.admin-touch-ux #screen-meta-links .show-settings,
.admin-touch-ux #contextual-help-link {
min-height: 44px;
line-height: 44px;
padding: 0 12px;
}
/*
* 4. Metabox toggle buttons — larger touch target.
*/
.admin-touch-ux .postbox .handlediv,
.admin-touch-ux .postbox .handle-order-higher,
.admin-touch-ux .postbox .handle-order-lower {
min-width: 44px;
min-height: 44px;
}
/*
* 5. Pagination inputs and buttons.
*/
.admin-touch-ux .tablenav .tablenav-pages a,
.admin-touch-ux .tablenav .tablenav-pages .current-page {
min-width: 44px;
min-height: 44px;
line-height: 44px;
text-align: center;
}
/*
* 6. Admin sidebar submenu — prevent text wrapping on touch.
* Slightly wider submenu for comfortable tapping.
*/
@media screen and (min-width: 783px) {
.admin-touch-ux #adminmenu .wp-submenu {
min-width: 200px;
}
.admin-touch-ux #adminmenu .wp-submenu a {
min-height: 40px;
line-height: 40px;
padding: 0 12px;
}
}
/*
* 7. Dashboard widget configure links.
*/
.admin-touch-ux .postbox .postbox-header .handle-actions button {
min-width: 44px;
min-height: 44px;
}