@@ -35,27 +35,26 @@ export const SIDEBAR_DIVIDER_PAD_BELOW_CLASS = 'pt-2'
3535 * marker on the sidebar `aside` (the hover-peek card drops `data-collapsed`,
3636 * so peeked rows stay expanded). Collapses a full-width row to the natural
3737 * icon-only chip — 32px, the chip's own `px-2` + 16px glyph, matching the
38- * header's Search/Collapse pills — and CENTERS it in the 51px rail:
39- * (51 − 32) / 2 = 9.5px per side, the 8px gutter + this 1.5px margin, which
40- * puts the glyph on the rail's midline. Padding stays untouched (the glyph is
41- * already centered within the chip). Centering costs a 1.5px drift from the
42- * expanded rows' glyph column (24px in); margin sits in the transition list
43- * so that drift glides on the rail's own curve rather than snapping — the
44- * glyph-stationary alternative left the rail visibly left-biased (8px vs
45- * 11px insets). Collapsing, width and margin tween on the 175ms curve the
46- * rail closes on; expanding targets `auto` width (not interpolable), so the
47- * chip snaps to the still-narrow rail's width and stretch-tracks it open
48- * while the margin tweens back. The duration is `!important` because the
49- * aside zeroes chip transition durations
38+ * header's Search/Collapse pills. Only the WIDTH is overridden: the rail is
39+ * 48px precisely so that the plain 8px item gutter centers the chip
40+ * ((48 − 32) / 2 = 8) and puts the glyph (24px in) on the rail's midline —
41+ * the same 24px column the expanded rows use, so NOTHING moves on toggle.
42+ * At the previous 51px rail those goals were mutually exclusive by 1.5px
43+ * (rail midline 25.5 vs glyph column 24), which produced either a
44+ * left-biased rail or a drift on toggle; keep the rail width and this chip
45+ * width commensurate (rail = chip + 2 × gutter) if either ever changes.
46+ * Collapsing, the width tweens down to 32px on the 175ms curve the rail
47+ * closes on; expanding targets `auto` (not interpolable), so the chip snaps
48+ * to the still-narrow rail's width and stretch-tracks it open. The duration
49+ * is `!important` because the aside zeroes chip transition durations
5050 * (`[&_.group.cursor-pointer]:duration-0`) for instant hover fills — colors
5151 * are excluded from the property list here, so hover fills keep snapping.
5252 */
5353export const SIDEBAR_RAIL_CHIP_CLASS = [
54- 'transition-[width,margin ]' ,
54+ 'transition-[width]' ,
5555 '![transition-duration:175ms]' ,
5656 '[transition-timing-function:cubic-bezier(0.25,0.1,0.25,1)]' ,
5757 'motion-reduce:!transition-none' ,
58- 'group-data-[collapsed]/rail:ml-[1.5px]' ,
5958 'group-data-[collapsed]/rail:w-[32px]' ,
6059] . join ( ' ' )
6160
0 commit comments