Can you apply some of the button styles from this side here?

merged…
osebo36d ago

Can you apply some of the button styles from this side here? https://www.dialkit.dev/

3 repliesoldestnewest
Osebotfable-5-136d ago

Looking at dialkit.dev's shipped CSS. Two button idioms there worth borrowing:

  1. Flat .dialkit-button / select trigger / segmented control: translucent ink surface (black 4% light, white 5–8% dark), no border, 8px radius, 13px/500 sans, muted text that darkens to full ink on hover, a one-step darker surface on :active, 150ms transitions. Segmented controls use a sliding "pill" (surface-active) behind transparent buttons.
  2. Hero glass pills: 999px radius, gradient fill (radial-gradient top-left highlight + linear-gradient 145deg white 13%→5%), 1px white 20% border, inset 0 1px top highlight, inset 0 -1px underline, soft 0 8px 18px drop shadow.

Plan: screenshot the site to confirm which look reads as "the button style", then port it onto app/globals.css's existing selectors (generic button, the secondary button.jump-top/.stop-run/.merge-pr/.compose-cancel group, .seg, .run-chip/.attach-btn chips, .page-head > a) via tokens, keeping dark mode + lib/terminal-themes.ts paletteVars in sync. Mockup before/after screenshots to follow.

Osebotfable-5-136d agothreadide@30bc6ba

Done: buttons now carry DialKit's glass finish, pushed on thread/e53880c0 (30bc6ba).

What I took from dialkit.dev: the hero's lit glass keys ("Weight", "Strength", the Off/On pill). Their CSS is inset 0 1px #ffffff4d (top shine) + inset 0 -1px (bottom shade) + a radial/linear highlight gradient + 1px translucent border + 0 8px 18px drop shadow. The flat .dialkit-button in their panels is just a translucent grey fill, which the app already had, so there was nothing to borrow there.

How it is applied (app/globals.css):

  • One rule after the generic button builds a five-layer box-shadow (shine, gloss band, shade, edge ring, lift) on button, the home "New thread" CTA, the active .seg segment, the Ask Claude / Image chips, selects and the PR pills. Shadow-only on purpose: the many later background: shorthands would wipe a gradient but never touch box-shadow, so nothing else needed restyling.
  • Grey controls use --*-fill layers, the solid primary (and armed Stop / Merge) use --*-accent. Hover raises --lift, :active collapses it, select focus swaps --edge for the ink hairline (replacing the old explicit focus shadow).
  • The chosen segment of Light | Dark style switches is now DialKit's lifted "pill" on a flat track instead of a darker grey.
  • Tokens live in :root, both dark blocks and lib/terminal-themes.ts paletteVars, so the /themes palettes get it too.
  • Ghost/text buttons (menus, nav toggle, avatar, links, the × on image chips) opt out; the two inline-styled transparent buttons (fork, remove repo) got className="ghost".

Not taken: DialKit's 999px pill radius (you kept the 4/6/10px scale and rejected pills before) and their 13px sans labels (the mono uppercase label system stays). If you do want the full pill look, it is one change: --radius: 999px on the button list.

Verified with static mockups of the real stylesheet (light + dark, 2× close-ups with a hovered secondary); tsc passes. Not checked in the running app: the compose panel's chips sitting on --bg inside the fill panel. Shout if anything there looks doubled.

Before (main) vs after (DialKit glass) in light and dark: primary, secondary, armed, disabled buttons, segmented control, selects, chips and PR pills
Before (main) vs after (DialKit glass) in light and dark: primary, secondary, armed, disabled buttons, segmented control, selects, chips and PR pills
Osebot36d ago

Merged threadide #130 by @osebo (merge, b33cc70).