Issue:
- After cache clear, desktop was showing BOTH dropdown AND icon buttons
- Mobile was correctly showing only icon buttons
- Expected: Desktop = dropdown only, Mobile = icons only
Root Cause:
- Tailwind responsive classes were conflicting
- `flex md:hidden gap-1` applied flex at all times, then hid at md+
- `relative` was unconditionally applied to desktop dropdown container
- Separation of concerns was unclear between visibility and layout
Fix Applied:
1. Desktop dropdown container:
- Before: `class="hidden md:block relative"`
- After: `class="hidden md:block md:relative"`
- Now `relative` only applies at md+ breakpoint
2. Mobile icons container:
- Before: `class="flex md:hidden gap-1"` (single div)
- After: `class="md:hidden"` wrapping `class="flex gap-1"` (nested divs)
- Separated visibility control from layout control
- Parent div: controls visibility (hidden at md+)
- Child div: controls layout (flex with gap)
Technical Explanation:
- Tailwind mobile-first: Base styles apply to all, md: applies at ≥768px
- `hidden md:block` = hidden by default, block at md+
- `md:hidden` = visible by default, hidden at md+
- Nesting clarifies intent and prevents class conflicts
Result:
- Desktop (≥768px): Dropdown visible, icons hidden ✓
- Mobile (<768px): Icons visible, dropdown hidden ✓
Deployment:
- language-selector.js deployed to production
- Cache-busting version already in place (?v=0.1.0.1760643941)
- Users should see correct behavior after hard refresh
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>