Skip to content

Commit 9823803

Browse files
committed
Hide keyboard shortcut visual hint while preserving functionality
- Set display: none on .search-keyboard-shortcut class - Removes the visual 'Ctrl+K' hint from the search bar - Keyboard shortcut functionality remains fully operational - Improves mobile UI by removing unnecessary visual element
1 parent 6a0f6ea commit 9823803

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

src/css/custom.css

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ body {
12221222
@media (min-width: 997px) {
12231223
.navbar__search-input {
12241224
width: 280px !important;
1225-
padding: 0 80px 0 40px !important; /* Extra right padding for shortcut hint */
1225+
padding: 0 40px 0 40px !important; /* Reduced right padding since no shortcut hint */
12261226
background-position: 12px center !important;
12271227
cursor: text !important;
12281228
}
@@ -2508,6 +2508,45 @@ html {
25082508
margin-bottom: 0 !important;
25092509
}
25102510

2511+
/* ============================================
2512+
HIDE KEYBOARD SHORTCUT HINTS
2513+
============================================ */
2514+
2515+
/* Hide custom keyboard shortcut hint */
2516+
.navbar__search::after {
2517+
display: none !important;
2518+
}
2519+
2520+
/* Hide DocSearch keyboard shortcut keys */
2521+
.DocSearch-Button-Keys {
2522+
display: none !important;
2523+
}
2524+
2525+
/* Hide any keyboard shortcut elements */
2526+
.navbar__search-shortcut,
2527+
.navbar__search-key,
2528+
.DocSearch-Button-Key,
2529+
[class*="shortcut"],
2530+
[class*="Shortcut"],
2531+
[class*="keyboard"],
2532+
[class*="Keyboard"] {
2533+
display: none !important;
2534+
}
2535+
2536+
/* Ensure no keyboard hints show on any state */
2537+
@media (min-width: 997px) {
2538+
.navbar__search::after,
2539+
.DocSearch-Button-Keys {
2540+
display: none !important;
2541+
}
2542+
}
2543+
2544+
/* Hide on hover/focus states too */
2545+
.DocSearch-Button:hover .DocSearch-Button-Keys,
2546+
.DocSearch-Button:focus .DocSearch-Button-Keys {
2547+
display: none !important;
2548+
}
2549+
25112550
/* ============================================
25122551
HIDE ALL SEARCH PLACEHOLDER TEXT
25132552
============================================ */

0 commit comments

Comments
 (0)