fix: navbar mobile dropdown clipped left edge - use left-0 instead of right-0
The dropdown was anchored to right-0 of the <details> element. On mobile, the trigger button sits near the left side of the viewport so right-0 caused the panel to extend leftward off-screen. Changing to left-0 opens the panel rightward from the button, keeping it fully visible. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -139,7 +139,7 @@ export default function Navbar({ minimal = false }) {
|
|||||||
☰ {currentItem?.label || 'Izbornik'}
|
☰ {currentItem?.label || 'Izbornik'}
|
||||||
</summary>
|
</summary>
|
||||||
{/* Dropdown je positioniran fixed-like kroz visoki z-index kako ne bi bio odsječen */}
|
{/* Dropdown je positioniran fixed-like kroz visoki z-index kako ne bi bio odsječen */}
|
||||||
<div className="absolute right-0 top-full mt-1 z-50 min-w-52 rounded-lg border border-border-hairline bg-canvas-elevated shadow-xl">
|
<div className="absolute left-0 top-full mt-1 z-50 min-w-52 rounded-lg border border-border-hairline bg-canvas-elevated shadow-xl">
|
||||||
<div className="border-b border-border-hairline px-3 py-2 text-[11px] uppercase tracking-wide text-text-muted">
|
<div className="border-b border-border-hairline px-3 py-2 text-[11px] uppercase tracking-wide text-text-muted">
|
||||||
Navigacija
|
Navigacija
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user