1# Effects
2
3Use tokens.css for shared values; components.css applies them.
4Inspect [tokens.css](/brand-workshop/system/tokens) in both palettes.
5
6## Elevation
7
8Ordinary panels stay flat, with named surfaces and hairline dividers.
9Floating context uses `--w-shadow-floating`; anchored navigation menus
10use the distinct `--w-shadow-menu`. Both retain dark shadow color in
11inverted contexts. Do not add a shadow to every bordered object.
12
13## Interaction states
14
15`--w-state-hover`, `--w-state-selected` and
16`--w-state-selected-hover` express the media-index wash hierarchy.
17Copy controls use `--w-state-hover-control`; file rows retain their
18own hover treatment and solid accent selection. Do not flatten these
19different roles into one generic selected style.
20
21Code navigation uses dimming and stronger active ink, with static
22ordinals and no item dividers or hover/selected fill. Text-only CTAs
23also remain text rather than acquiring a background wash.
24
25Action controls use the compact `--w-radius-control` and 150ms color or
26border feedback. Do not apply that radius to panels, media wells or
27figures; the small optical softening belongs to controls only.
28
29## Context and focus
30
31`--w-highlight` is the accent wash for annotated code ranges. It
32accompanies an edge indicator and accessible context, not color alone.
33Desktop uses grouped hover/focus context; narrow or coarse-pointer
34layouts use inline disclosures.
35
36`--w-border-width` is the standard hairline.
37`--w-focus-width` and `--w-focus-offset` define the common focus ring.
38Inset focus and tight copy controls keep explicit local offsets to
39avoid clipping; do not globally force an outward ring on every control.
40Only show actual keyboard focus as focus: a reference sample labeled
41"Focus treatment" must not pretend the element is currently focused.
42
43Verify the actual tooltip, not just an inline shadow swatch. Its native
44popover enters the top layer while inheriting the component's tokens.
45Escape, blur, scrolling and file changes must still dismiss context.
46
47Related source: docs/code-panel.md and docs/motion.md.
48[Code Panel](/brand-workshop/system/code-panel) ·
49[Motion](/brand-workshop/system/motion).