From bd8e10f3354d0907772ac461270be166a0cde1fa Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 5 Jun 2025 15:53:13 -0500 Subject: [PATCH] Don't hide expander on small screens with 1 item --- app/assets/stylesheets/trays.css | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/trays.css b/app/assets/stylesheets/trays.css index 1b362d4ec..9dc99bd0a 100644 --- a/app/assets/stylesheets/trays.css +++ b/app/assets/stylesheets/trays.css @@ -133,6 +133,12 @@ } } + @media (max-width: 799px) { + .tray__dialog:not([open]) ~ & { + opacity: 0 !important; + } + } + @media (prefers-color-scheme: dark) { .btn--reversed { color: var(--color-ink); @@ -264,15 +270,6 @@ .tray--pins { inset-inline: var(--tray-margin) auto; - /* Don't expand if there's only one pin */ - .tray__dialog:has(.tray__item:only-child) { - pointer-events: unset; - - ~ .tray__expander { - display: none; - } - } - .tray__item { --tray-item-z: calc(10 - var(--tray-item-index)); @@ -329,6 +326,17 @@ display: none; } + /* Don't expand if there's only one pin on large viewports */ + @media (min-width: 800px) { + .tray__dialog:has(.tray__item:only-child) { + pointer-events: unset; + + ~ .tray__expander { + display: none; + } + } + } + @media (max-width: 799px) { .tray__expander { border-inline-end: 1px dashed oklch(var(--lch-white) / 50%);