Files
dawnline/web/src/portal/styles/accordion.css
T
Aemeath ba231e7187
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
Dawnline 0.15.0
- The device menu (⋯) is an iOS-style menu on frosted glass: the copy
  actions show the address they copy, Rename, Reconnect and Remove sit
  under them, and one highlight glides from row to row
- The language picker shows flags; pick a language with a click, or
  press the pill and slide onto one. The flag and the code change in
  place
- The page's QR code opens as a small card under its button, with Copy
  link and Share
- All dropdowns look and behave the same: frosted glass, one open at a
  time, and a press outside, Escape or the button again closes them
- Setting a device up: when it can't finish connecting or connects but
  passes no data, the sheet keeps just the status and what it means.
  No data now says the router drops its traffic because the address
  doesn't match, and the device's card says "Connected, but no data"
  right away instead of "Connected"
- Setting a phone up from another device: Download and Copy for the
  connection sit on its row, next to the arrow
- On iPhone and iPad the caret shows as soon as a field is focused, the
  page no longer zooms on a pinch or a double tap, and sheets and their
  animations run smoother
- A press near the edge of a button or a card always counts, even as it
  shrinks under the pointer
- Animations settle without a jump at the end
- New green, orange and red
- The focus ring shows only while moving around with the keyboard
2026-10-22 04:02:54 +03:00

200 lines
4.9 KiB
CSS

/* The bouncy accordion: rows touch while closed and share their rounded ends; an open row lifts
out with 10px gaps and its own corners (ui/accordion.ts animates between the two shapes). Inside
the sheet ("inset") the rows sit one step lighter than the sheet. */
.acc {
display: flex;
flex-direction: column;
}
.acc-row {
background: var(--raised);
overflow: hidden;
border-radius: 0;
padding: 0 8px;
transition: background-color 150ms;
}
.acc-row.rt {
border-top-left-radius: var(--r-row);
border-top-right-radius: var(--r-row);
}
.acc-row.rb {
border-bottom-left-radius: var(--r-row);
border-bottom-right-radius: var(--r-row);
}
.acc-row.open {
margin-block: 10px;
}
/* The first and last rows that show (ui/accordion.ts: a row stepped out leaves none of its gap). */
.acc-row.open.first {
margin-top: 0;
}
.acc-row.open.last {
margin-bottom: 0;
}
.acc-row:not(.open):not(.still):hover {
background: color-mix(in srgb, var(--raised), var(--knob) 40%);
}
.acc-head {
width: 100%;
display: flex;
align-items: center;
gap: 10px;
height: 52px;
padding: 0 6px 0 8px;
text-align: left;
}
.acc-row.still .acc-head {
cursor: default;
padding-right: 10px;
}
.acc-head .gi {
width: 22px;
height: 22px;
}
.acc-title {
flex: 1;
min-width: 0;
font-size: 15px;
font-weight: 500;
letter-spacing: -0.02em;
display: flex;
align-items: center;
gap: 8px;
}
.acc-title .t {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* A row whose body shows its numbers drops them from its head while open. */
.acc-val {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-2);
font-size: 14px;
white-space: nowrap;
transition:
opacity 200ms var(--ease-out),
filter 200ms var(--ease-out),
transform 260ms var(--ease-out);
}
.acc-val > span {
display: inline-flex;
align-items: center;
gap: 8px;
}
.acc-row.open > .acc-head > .acc-val.hide-open {
opacity: 0;
filter: blur(4px);
transform: translateX(8px);
pointer-events: none;
}
/* Actions on what an open row holds (ui/accordion.ts aside): beside the chevron, over the head's end, coming
in as the row opens and going as it shuts; the title keeps clear of them meanwhile (--aside-w: their width
and a gap). */
.acc-row.has-aside {
position: relative;
--aside-w: 72px;
}
.acc-aside {
position: absolute;
top: 0;
right: 40px;
height: 52px;
display: flex;
align-items: center;
transition:
opacity 200ms var(--ease-out),
filter 200ms var(--ease-out),
transform 200ms var(--ease-out);
}
.acc-row:not(.open) > .acc-aside {
opacity: 0;
filter: blur(4px);
transform: translateX(8px);
pointer-events: none;
visibility: hidden;
transition-property: opacity, filter, transform, visibility;
}
.acc-row.has-aside > .acc-head > .acc-title {
transition: padding-right 200ms var(--ease-out);
}
.acc-row.has-aside.open > .acc-head > .acc-title {
padding-right: var(--aside-w);
}
.acc-chev {
width: 16px;
height: 16px;
color: var(--text-2);
transform: rotate(90deg);
transition: transform var(--spring-soft-dur, 470ms) var(--spring-soft, ease);
}
/* Only the row's own head and body: a row inside an open row keeps its own state (the router's
"Configuration" inside "Set it up again"). */
.acc-row.open > .acc-head > .acc-chev {
transform: rotate(-90deg);
}
.acc-body {
display: none;
padding: 0 8px 16px 40px;
}
.acc-row.open > .acc-body,
.acc-row.closing > .acc-body {
display: flex;
flex-direction: column;
gap: 12px;
}
.acc .desc {
margin: 0;
font-size: 14px;
line-height: 20px;
opacity: 0.6;
}
.acc.inset .acc-row {
background: var(--field);
}
.acc.inset .acc-row:not(.open):not(.still):hover {
background: color-mix(in srgb, var(--field), var(--knob) 50%);
}
.acc.inset .acc-body {
padding-left: 8px;
}
.acc.inset .seg {
background: color-mix(in srgb, var(--knob) 65%, var(--field));
}
/* Steps inside an inset row ("Set it up again") sit on field: their badges step up as the picker
does, and one step more on hover. */
.acc.inset .badge {
background: color-mix(in srgb, var(--knob) 65%, var(--field));
}
.acc.inset .badge:hover {
background: var(--knob);
}
/* The router's file step inside an inset row: its card, its inset "Configuration" row and what
that row opens step up one the same way; its buttons one more, and one more again on hover. */
.acc.inset .filecard,
.acc.inset .acc.inset .acc-row {
background: color-mix(in srgb, var(--knob) 65%, var(--field));
}
.acc.inset .acc.inset .acc-row:not(.open):not(.still):hover {
background: var(--knob);
}
.acc.inset .filecard-ic,
.acc.inset .acc.inset .btn.soft {
background: color-mix(in srgb, var(--knob), var(--text) 6%);
}
.acc.inset .acc.inset .btn.soft:hover {
background: color-mix(in srgb, var(--knob), var(--text) 12%);
}
.acc.inset .acc.inset .conf {
background: var(--knob);
}
@media (prefers-reduced-motion: reduce) {
.acc-chev {
transition: none;
}
}