feat(ui): add responsive mobile layout with hamburger menu
Some checks failed
CI / Format (push) Failing after 3s
CI / Clippy (push) Failing after 4s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Format (pull_request) Failing after 3s
CI / Clippy (pull_request) Failing after 4s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Deploy (push) Has been skipped
CI / Deploy (pull_request) Has been skipped
Some checks failed
CI / Format (push) Failing after 3s
CI / Clippy (push) Failing after 4s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Format (pull_request) Failing after 3s
CI / Clippy (pull_request) Failing after 4s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Deploy (push) Has been skipped
CI / Deploy (pull_request) Has been skipped
Add three responsive breakpoints (1024px, 768px, 480px) to make the dashboard fully usable on tablets and phones. The sidebar now slides in as an overlay on mobile with a hamburger toggle in a fixed header bar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -356,6 +356,95 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.dropdown {
|
||||
@layer daisyui.l1.l2.l3 {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
position-area: var(--anchor-v, bottom) var(--anchor-h, span-right);
|
||||
& > *:not(:has(~ [class*="dropdown-content"])):focus {
|
||||
--tw-outline-style: none;
|
||||
outline-style: none;
|
||||
@media (forced-colors: active) {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
.dropdown-content {
|
||||
position: absolute;
|
||||
}
|
||||
&.dropdown-close .dropdown-content, &:not(details, .dropdown-open, .dropdown-hover:hover, :focus-within) .dropdown-content, &.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible) ~ .dropdown-content {
|
||||
display: none;
|
||||
transform-origin: top;
|
||||
opacity: 0%;
|
||||
scale: 95%;
|
||||
}
|
||||
&[popover], .dropdown-content {
|
||||
z-index: 999;
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
animation: dropdown 0.2s;
|
||||
transition-property: opacity, scale, display;
|
||||
transition-behavior: allow-discrete;
|
||||
transition-duration: 0.2s;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
}
|
||||
@starting-style {
|
||||
&[popover], .dropdown-content {
|
||||
scale: 95%;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
&:not(.dropdown-close) {
|
||||
&.dropdown-open, &:not(.dropdown-hover):focus, &:focus-within {
|
||||
> [tabindex]:first-child {
|
||||
pointer-events: none;
|
||||
}
|
||||
.dropdown-content {
|
||||
opacity: 100%;
|
||||
scale: 100%;
|
||||
}
|
||||
}
|
||||
&.dropdown-hover:hover {
|
||||
.dropdown-content {
|
||||
opacity: 100%;
|
||||
scale: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:is(details) {
|
||||
summary {
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:where([popover]) {
|
||||
background: #0000;
|
||||
}
|
||||
&[popover] {
|
||||
position: fixed;
|
||||
color: inherit;
|
||||
@supports not (position-area: bottom) {
|
||||
margin: auto;
|
||||
&.dropdown-close, &.dropdown-open:not(:popover-open) {
|
||||
display: none;
|
||||
transform-origin: top;
|
||||
opacity: 0%;
|
||||
scale: 95%;
|
||||
}
|
||||
&::backdrop {
|
||||
background-color: color-mix(in oklab, #000 30%, #0000);
|
||||
}
|
||||
}
|
||||
&.dropdown-close, &:not(.dropdown-open, :popover-open) {
|
||||
display: none;
|
||||
transform-origin: top;
|
||||
opacity: 0%;
|
||||
scale: 95%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
:where(&) {
|
||||
@layer daisyui.l1.l2.l3 {
|
||||
|
||||
Reference in New Issue
Block a user