Fix sidenav collapse button flash on mobile

Doubled CSS selector specificity to ensure display: none beats
Button.module.css's display: flex regardless of load order.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kalle
2026-01-17 08:21:34 +02:00
parent fcd5d9bbba
commit d536fe2f45
2 changed files with 6 additions and 4 deletions

View File

@@ -1,10 +1,11 @@
---
# sendou.ink-ekv0
title: Collapse sidenav button flashes on mobile page load
status: todo
status: completed
type: bug
priority: normal
created_at: 2026-01-15T19:16:35Z
updated_at: 2026-01-15T19:16:35Z
updated_at: 2026-01-17T06:04:49Z
---
The collapse sidenav button should not be visible on mobile at all, but it currently flashes briefly during page load before being hidden. It should not show even for a fraction of a second.

View File

@@ -110,7 +110,8 @@
padding: var(--s-1) var(--s-2);
}
.sideNavCollapseButton {
/* Doubled selector increases specificity to beat Button.module.css's display: flex */
.sideNavCollapseButton.sideNavCollapseButton {
display: none;
& svg {
@@ -121,7 +122,7 @@
}
@media screen and (min-width: 600px) {
.sideNavCollapseButton {
.sideNavCollapseButton.sideNavCollapseButton {
display: flex;
}
}