make-interfaces-feel-better
Design engineering principles for making interfaces feel polished, with focus on micro-interactions, typography, and visual details.
Install
npx skills add https://github.com/jakubkrehel/make-interfaces-feel-better --skill make-interfaces-feel-betterSurfaces
Border radius, optical alignment, shadows, and image outlines.
Concentric Border Radius
When nesting rounded elements, the outer radius must equal the inner radius plus the padding between them:
This rule is most useful when nested surfaces are close together. If padding is larger than 24px, treat the layers as separate surfaces and choose each radius independently instead of forcing strict concentric math.
Example
Tailwind Example
Mismatched border radii on nested elements is one of the most common things that makes interfaces feel off. Always calculate concentrically.
Optical Alignment
When geometric centering looks off, align optically instead.
Buttons with Text + Icon
Use slightly less padding on the icon side to make the button feel balanced. A reliable rule of thumb is:
icon-side padding = text-side padding - 2px.
Play Button Triangles
Play icons are triangular and their geometric center is not their visual center. Shift slightly right:
Asymmetric Icons (Stars, Arrows, Carets)
Some icons have uneven visual weight. The best fix is adjusting the SVG directly so no extra margin/padding is needed in the component code.
Shadows Instead of Borders
For buttons, cards, and containers that use a border for depth or elevation, prefer replacing it with a subtle box-shadow. Shadows adapt to any background since they use transparency; solid borders don't. This also helps when using images or multiple colors as backgrounds — solid border colors don't work well on backgrounds other than the ones they were designed for.
Do not apply this to dividers (border-b, border-t, side borders) or any border whose purpose is layout separation rather than element depth. Those should stay as borders.
Shadow as Border (Light Mode)
The shadow is comprised of three layers. The first acts as a 1px border ring, the second adds subtle lift, and the third provides ambient depth:
Shadow as Border (Dark Mode)
In dark mode, simplify to a single white ring — layered depth shadows aren't visible on dark backgrounds:
Usage with Hover Transition
Apply the variable and add transition-[box-shadow] for a smooth hover:
When to Use Shadows vs. Borders
Image Outlines
Add a subtle 1px outline with low opacity to images. This creates consistent depth, especially in design systems where other elements use borders or shadows.
Color rules (non-negotiable)
- Light mode: pure black,
oklch(0 0 0 / 0.1). - Dark mode: pure white,
oklch(1 0 0 / 0.1). - Never use a near-black or near-white from the project palette (e.g. slate-900, zinc-900,
#0a0a0a,#111827,#f5f5f7). Tinted outlines pick up the surrounding surface color and read as dirt on the image edge. - Never match the outline to the project's accent or ink color. The outline is a neutral separator, not a themed element.
Light Mode
Dark Mode
Tailwind with Dark Mode
Use outline-black/10 and outline-white/10 specifically — not outline-slate-*, outline-zinc-*, outline-neutral-*, or any tinted scale.
Why outline instead of border? outline doesn't affect layout (no added width/height), and outline-offset: -1px keeps it inset so images stay their intended size.
Minimum Hit Area
Interactive elements should prefer a 44×44px hit area for touch or mobile contexts. In dense desktop interfaces, use at least 40×40px. If the visible element is smaller (e.g., a 20×20 checkbox), extend the hit area with a pseudo-element.
CSS Example
Tailwind Example
Collision Rule
If the extended hit area overlaps another interactive element, shrink the pseudo-element — but make it as large as possible without colliding. Two interactive elements should never have overlapping hit areas.