Files
grimoire/src/components/command-launcher.css
Alejandro 2ad3f90174 Improve mobile UX with larger touch targets (#223)
- Add useIsMobile hook for viewport detection
- TabBar: larger height (48px), disable reorder on mobile, hide workspace numbers
- Header buttons: larger touch targets for SpellbookDropdown, UserMenu, LayoutControls
- Window toolbar: larger buttons (40px) on mobile
- Mosaic dividers: wider (12px) on mobile for easier dragging
- CommandLauncher: larger items, footer text, hide kbd hints on mobile
- Editor suggestions: responsive widths, min-height 44px touch targets
- EventFooter: larger kind/relay buttons on mobile
- CodeCopyButton: larger padding and icon on mobile
- MembersDropdown: larger trigger and list items on mobile

All changes use mobile-first Tailwind (base styles for mobile, md: for desktop)
to meet Apple HIG 44px minimum touch target recommendation.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 12:19:31 +01:00

228 lines
4.2 KiB
CSS

/* Command Launcher Styles - Terminal Aesthetic */
.grimoire-command-launcher {
max-width: 640px;
padding: 0;
overflow: hidden;
}
@media (max-width: 767px) {
.grimoire-command-launcher {
/* Use width with calc to stay centered (dialog uses translate-x-50%) */
width: calc(100% - 32px);
max-width: calc(100% - 32px);
}
}
.grimoire-command-content {
width: 100%;
}
.command-launcher-wrapper {
width: 100%;
background: hsl(var(--background));
}
.command-input {
width: 100%;
padding: 16px 20px;
background: transparent;
border: none;
border-bottom: 1px solid hsl(var(--border));
font-family: monospace;
font-size: 16px;
color: hsl(var(--foreground));
outline: none;
}
.command-input::placeholder {
color: hsl(var(--muted-foreground));
font-family: monospace;
}
.command-hint {
padding: 8px 20px;
border-bottom: 1px solid hsl(var(--border));
font-family: monospace;
font-size: 12px;
display: flex;
align-items: center;
gap: 8px;
background: hsl(var(--muted));
}
.command-hint-label {
color: hsl(var(--muted-foreground));
}
.command-hint-command {
color: hsl(var(--foreground));
font-weight: 600;
}
.command-hint-args {
color: hsl(var(--accent));
}
.command-list {
max-height: 400px;
overflow-y: auto;
padding: 8px;
}
.command-empty {
padding: 32px 20px;
text-align: center;
color: hsl(var(--muted-foreground));
font-size: 14px;
font-family: monospace;
}
.command-group {
margin-bottom: 12px;
}
.command-group [cmdk-group-heading] {
padding: 8px 12px 4px;
font-size: 11px;
font-weight: 600;
color: hsl(var(--muted-foreground));
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: monospace;
}
.command-item {
padding: 14px 16px;
cursor: pointer;
transition: all 0.1s ease;
margin-bottom: 2px;
border: 1px solid transparent;
}
@media (min-width: 768px) {
.command-item {
padding: 10px 12px;
}
}
/* Inverted selection - terminal style */
.command-item[aria-selected="true"] {
background: hsl(var(--foreground));
color: hsl(var(--background));
border-color: hsl(var(--foreground));
}
.command-item[aria-selected="false"]:hover {
background: hsl(var(--muted));
border-color: hsl(var(--border));
}
/* Exact match indicator */
.command-item[data-exact-match="true"] {
border-color: hsl(var(--accent));
}
.command-item-content {
display: flex;
flex-direction: column;
gap: 4px;
}
.command-item-name {
display: flex;
align-items: baseline;
gap: 8px;
font-family: monospace;
font-size: 14px;
}
.command-name {
font-weight: 600;
}
.command-args {
color: hsl(var(--muted-foreground));
font-size: 12px;
}
.command-item[aria-selected="true"] .command-args {
color: hsl(var(--background));
opacity: 0.7;
}
.command-match-indicator {
margin-left: auto;
color: hsl(var(--accent));
font-size: 12px;
}
.command-item[aria-selected="true"] .command-match-indicator {
color: hsl(var(--background));
}
.command-item-description {
font-size: 12px;
color: hsl(var(--muted-foreground));
font-family: monospace;
}
.command-item[aria-selected="true"] .command-item-description {
color: hsl(var(--background));
opacity: 0.8;
}
.command-footer {
padding: 12px 20px;
border-top: 1px solid hsl(var(--border));
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: hsl(var(--muted-foreground));
font-family: monospace;
}
@media (min-width: 768px) {
.command-footer {
font-size: 12px;
}
}
.command-footer-status {
color: hsl(var(--accent));
font-weight: 600;
}
.command-footer kbd {
padding: 4px 10px;
background: hsl(var(--muted));
border: 1px solid hsl(var(--border));
font-size: 13px;
font-family: monospace;
margin: 0 4px;
}
@media (min-width: 768px) {
.command-footer kbd {
padding: 2px 6px;
font-size: 11px;
}
}
/* Scrollbar styling to match terminal aesthetic */
.command-list::-webkit-scrollbar {
width: 8px;
}
.command-list::-webkit-scrollbar-track {
background: transparent;
}
.command-list::-webkit-scrollbar-thumb {
background-color: hsl(var(--scrollbar-thumb));
}
.command-list::-webkit-scrollbar-thumb:hover {
background-color: hsl(var(--scrollbar-thumb-hover));
}