Skip to main content

glass_selected_shadows

Function glass_selected_shadows 

Source
pub fn glass_selected_shadows() -> Vec<BoxShadow>
Expand description

The selected chip’s bright outline, as an INSET shadow: gpui paints inset shadows ON TOP of the background, edges only — a border with zero layout cost. Drop shadows are filled rects painted BEHIND the element, and behind a 5% fill they showed straight through as an opaque dark plate with a greyed ring (user report) — nothing may paint behind a glass chip.

Light pins the ring at a flat 7% black rather than the scaled hairline: heavier rings (the INK_HAIRLINE_SCALEd value, then 12%) outlined every selected chip in a dark box (user reports) — the ring should define the chip the way dark’s 9% white ring does, not frame it.

There is deliberately NO drop-shadow seat under the light chip. Three recipes were tried (a tight 10% layer, a 6% contact + 5% ambient pair, a lone 4% whisper) and every one failed on sight: layers sum into a grey rim exactly where the chip meets the frost, gpui’s small-radius blur reads coarse on a bright field, and the tab strip is a scroll container that clips its children vertically — any shadow escaping the chip gets cut off mid-fade. The near-opaque fill plus the ring carry selection, exactly as dark’s wash plus ring does; the two appearances share one recipe now.