S005: shadow and menu width from the design references, renumber D-031

Floating surfaces get the deeper, scheme-aware shadow of the reference
dialogs; menus are at least 180 px wide. The overlay decision clashed
with another D-029 and is now D-031.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-18 10:09:03 -06:00
commit a56cd84f09
2 changed files with 8 additions and 7 deletions

View file

@ -314,7 +314,7 @@ export component Menu inherits Overlay {
}
surface := MenuSurface {
property <length> w: clamp(column.preferred-width, 112px, 280px);
property <length> w: clamp(column.preferred-width, 180px, 280px);
width: self.w;
height: column.preferred-height;
@ -357,7 +357,7 @@ export component Menu inherits Overlay {
// The parent row's top, so the first submenu row lines up with it.
property <length> row-y: surface.y + root.sub-row-y - Theme.space-1;
width: clamp(sub-column.preferred-width, 112px, 280px);
width: clamp(sub-column.preferred-width, 180px, 280px);
height: sub-column.preferred-height;
x: root.place(surface.x + surface.width - Theme.space-1, surface.x + Theme.space-1, self.width, root.width);
y: root.place(self.row-y, root.height, self.height, root.height);

View file

@ -70,9 +70,10 @@ export global Theme {
// Floating surfaces (menus, dialogs, toasts, tooltips): one soft shadow, mixed from
// `shadow`. Resting surfaces have none.
out property <length> float-shadow-blur: 12px;
out property <length> float-shadow-offset: 4px;
out property <float> float-shadow-opacity: 0.18;
out property <length> float-shadow-blur: 24px;
out property <length> float-shadow-offset: 6px;
// Dark surfaces need a deeper shadow to read as lifted.
out property <float> float-shadow-opacity: root.dark ? 0.59 : 0.27;
// Dims the window behind a modal dialog, mixed from `scrim`.
out property <float> scrim-opacity: 0.32;
// Gap kept between a floating surface and the window edge.