Skip to content

Commit dad3e37

Browse files
Improve touch device support in theme dock with larger targets and disable hover effects
1 parent 230e5d3 commit dad3e37

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

lexicon.html

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -993,18 +993,41 @@
993993
color: #fff;
994994
}
995995

996-
/* === MOBILE: Scrollable dock with larger touch targets === */
997-
@media (max-width: 768px) {
996+
/* === TOUCH DEVICES: Larger targets, no hover effects === */
997+
@media (hover: none), (pointer: coarse) {
998998
.theme-dock {
999999
--dock-unit: 3px; /* Larger for touch targets */
1000+
}
1001+
1002+
/* Disable hover effects on touch */
1003+
.theme-dock label:hover {
1004+
width: var(--dock-card-width);
1005+
height: var(--dock-card-height);
1006+
padding: var(--dock-card-padding-top) 0 var(--dock-card-padding-bottom) 0;
1007+
font-size: var(--dock-card-font);
1008+
border-radius: var(--dock-radius);
1009+
transform: none;
1010+
margin-bottom: 0;
1011+
box-shadow: none;
1012+
}
1013+
1014+
.theme-dock label:hover::after {
1015+
height: var(--dock-bar-height);
1016+
}
1017+
}
1018+
1019+
/* === NARROW VIEWPORT: Full-width scrollable dock ===
1020+
Breakpoint based on touch dock: 10×57px + 9×3px gaps + 12px padding ≈ 620px */
1021+
@media (max-width: 620px) {
1022+
.theme-dock {
10001023
left: 0;
10011024
right: 0;
10021025
transform: none;
10031026
border-radius: 0;
10041027
bottom: 0;
10051028
overflow-x: auto;
10061029
flex-wrap: nowrap;
1007-
justify-content: safe center; /* Center until overflow, then scroll */
1030+
justify-content: safe center;
10081031
}
10091032

10101033
/* Hide scrollbar */
@@ -1013,46 +1036,23 @@
10131036
}
10141037

10151038
.theme-dock {
1016-
-ms-overflow-style: none; /* IE/Edge */
1039+
-ms-overflow-style: none;
10171040
}
10181041

10191042
@supports (scrollbar-width: none) {
10201043
.theme-dock {
1021-
scrollbar-width: none; /* Firefox */
1044+
scrollbar-width: none;
10221045
}
10231046
}
10241047

10251048
.theme-dock label {
10261049
flex-shrink: 0;
10271050
}
1028-
1029-
/* Disable hover effects on touch */
1030-
.theme-dock label:hover {
1031-
width: var(--dock-card-width);
1032-
height: var(--dock-card-height);
1033-
padding: var(--dock-card-padding-top) 0 var(--dock-card-padding-bottom) 0;
1034-
font-size: var(--dock-card-font);
1035-
border-radius: var(--dock-radius);
1036-
transform: none;
1037-
margin-bottom: 0;
1038-
box-shadow: none;
1039-
}
1040-
1041-
.theme-dock label:hover::after {
1042-
height: var(--dock-bar-height);
1043-
}
1044-
1045-
/* Wrapper not needed on mobile without JS arrows */
1046-
.theme-dock-wrapper {
1047-
display: contents;
1048-
}
10491051
}
10501052

1051-
/* Desktop: wrapper does nothing */
1052-
@media (min-width: 769px) {
1053-
.theme-dock-wrapper {
1054-
display: contents;
1055-
}
1053+
/* Wrapper always uses display:contents (no-op) */
1054+
.theme-dock-wrapper {
1055+
display: contents;
10561056
}
10571057

10581058
/* === HIDDEN RADIO INPUTS === */

0 commit comments

Comments
 (0)