Default sidebar to open on desktop via CSS

Make the map and panel CSS default to "sidebar open" on desktop
(>= 1024px) without requiring the slideover-open class. Only the
slideover-closed class now hides the sidebar. This prevents a blank
gap when the map and panel states get out of sync after LiveView
reconnects.
This commit is contained in:
Graham McIntire 2026-02-25 12:25:40 -06:00
parent 88e2c48f97
commit d385d1eb75
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View file

@ -33,9 +33,9 @@
transition: right 0.3s ease-in-out !important; transition: right 0.3s ease-in-out !important;
} }
/* Desktop slideover behavior for map */ /* Desktop slideover behavior for map - default to sidebar open */
@media (min-width: 1024px) { @media (min-width: 1024px) {
#aprs-map.slideover-open { #aprs-map {
right: 352px !important; right: 352px !important;
} }

View file

@ -278,9 +278,9 @@ defmodule AprsmeWeb.MapLive.Components do
transition: right 0.3s ease-in-out; transition: right 0.3s ease-in-out;
} }
/* Desktop styles */ /* Desktop styles - default to sidebar open */
@media (min-width: 1024px) { @media (min-width: 1024px) {
#aprs-map.slideover-open { #aprs-map {
right: 352px; right: 352px;
} }
@ -305,8 +305,11 @@ defmodule AprsmeWeb.MapLive.Components do
overflow: hidden; overflow: hidden;
} }
.slideover-panel.slideover-open { /* Desktop: default to visible, only hide when explicitly closed */
transform: translateX(0); @media (min-width: 1024px) {
.slideover-panel {
transform: translateX(0);
}
} }
.slideover-panel.slideover-closed { .slideover-panel.slideover-closed {