diff --git a/frontend/src/components/Dashboard/ui/core/core.css b/frontend/src/components/Dashboard/ui/core/core.css index c55e7fd..478f97e 100644 --- a/frontend/src/components/Dashboard/ui/core/core.css +++ b/frontend/src/components/Dashboard/ui/core/core.css @@ -19,7 +19,12 @@ min-width: 0; flex-direction: column; gap: 0.5rem; - overflow: hidden; + /* `clip` rather than `hidden`, so a control's glow is not capped hard at the + tile's edge. The body below sits 1rem inside this box already, which with + this margin is the 22px `--gl-glow` fades over — and 0.5rem is all that + leaves the tile, which is the gutter between two of them. */ + overflow: clip; + overflow-clip-margin: 0.5rem; padding: 1rem; /* A pointer above `md`, a finger below it, and a panel that says it is touched gets the finger whatever its size. */ @@ -85,10 +90,12 @@ } /* - * The body is the query container everything inside is measured against, and - * the scroller for anything taller than the tile. Centring has to be `safe`: - * plain `center` overflows both edges at once and puts the top of a long body - * out of reach. + * The body is the query container everything inside is measured against. + * Clipped rather than scrolling by default — a picture drawn to fit the tile + * has nothing to scroll, and a box that scrolls is one that clips whatever + * glow or shadow crosses its edge. `.dui-frame-scroll` (`scrolls()` in + * `core/config.ts`) opts the few widgets that are text or a list back into a + * real scroller, which has to clip at its own edge to work at all. */ .dui-frame-body { display: flex; @@ -96,12 +103,20 @@ min-width: 0; flex: 1; flex-direction: column; + /* Centring has to be `safe`: plain `center` overflows both edges at once + and puts the top of a long body out of reach. */ justify-content: safe center; - overflow-y: auto; + /* Wide enough for the 22px `--gl-glow` of a control that fills the body. */ + overflow: clip; + overflow-clip-margin: 1.5rem; container-type: size; font-size: var(--dui-text); } +.dui-frame-scroll { + overflow: auto; +} + /* No header, so the fault still has somewhere to be seen. */ .dui-frame-corner { position: absolute; diff --git a/frontend/src/components/Dashboard/ui/glass/Data.tsx b/frontend/src/components/Dashboard/ui/glass/Data.tsx index c2a4114..742ccba 100644 --- a/frontend/src/components/Dashboard/ui/glass/Data.tsx +++ b/frontend/src/components/Dashboard/ui/glass/Data.tsx @@ -68,7 +68,9 @@ export function Gauge({ value, min, max, precision, unit, label }: GaugeProps) {
diff --git a/frontend/src/components/Dashboard/ui/glass/glass.css b/frontend/src/components/Dashboard/ui/glass/glass.css index f838bbd..6e56749 100644 --- a/frontend/src/components/Dashboard/ui/glass/glass.css +++ b/frontend/src/components/Dashboard/ui/glass/glass.css @@ -152,7 +152,11 @@ .gl-pressable { position: relative; - overflow: hidden; + /* `clip` rather than `hidden`: the press ripple below is inset 0 and rounds + with the surface regardless, but a segment's `--gl-glow` thumb sits inside + this box too and needs room to fade rather than being cut off at it. */ + overflow: clip; + overflow-clip-margin: 1.5rem; isolation: isolate; }