Make Interfaces Feel Better

affaan-m/ECC/pi/core/skills/make-interfaces-feel-better

作者 affaan-mef648e01899ba3e8dc6371642deaaf64b4477775無授權條款275K 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫4 天前更新

Apply concrete design-engineering details that make interfaces feel polished. Use when reviewing or improving UI spacing, typography, borders, shadows, motion, hit areas, icons, text wrapping, and interaction states.

僅含說明Design & Creative
AI 產生的概覽

為介面細節提供設計工程打磨指南,涵蓋間距、排版、陰影、動效與點擊區域。

功能
此技能為讓使用者介面更精緻提供具體的設計工程指引。內容涵蓋同心圓角、視覺對齊、邊框與陰影、文字換行、字型平滑、圖片描邊、動效與過渡範圍以及點擊區域。它也定義了使用前後對比列的審查輸出格式,並附有最終檢查清單。
適用情境
當使用者表示介面感覺不對、扁平、通用、擁擠、跳動或未完成時使用,也適用於建構控制項、卡片、清單、儀表板、導覽、表單或工具列。它也用於加入懸停、作用中、聚焦、進入、離開、載入或空狀態,以及需要具體前後建議的前端審查。
執行需求
不需要指令碼或特殊工具,僅為指令型技能。它假定處於可審查或編輯 CSS 與 UI 元件的前端環境。

Make Interfaces Feel Better

Use this skill for the small design-engineering details that compound into a more polished interface.

Source: salvaged from stale community PR #1659 by linus707.

When to Use

  • The user says the UI feels off, flat, generic, cramped, jumpy, or unfinished.
  • You are building controls, cards, lists, dashboards, navigation, forms, or toolbars.
  • A component needs hover, active, focus, enter, exit, loading, or empty states.
  • A frontend review needs specific before/after recommendations.

Core Principles

Concentric Radius

For nearby nested rounded surfaces:

text
outer radius = inner radius + padding

If padding is large, treat layers as separate surfaces instead of forcing the math. The point is optical coherence, not formula worship.

Optical Alignment

Geometric centering is not always visual centering. Icon buttons, play triangles, arrows, stars, and asymmetric icons often need a small offset. Fix the SVG when possible; otherwise adjust with a pixel-level margin or padding change.

Shadows And Borders

Use borders for separation and focus rings. Use layered shadows when a card, button, dropdown, or popover needs depth. Shadows should be transparent and subtle enough to work across backgrounds.

Text Wrapping

  • Use text-wrap: balance on headings and short titles.
  • Use text-wrap: pretty on short-to-medium body text, captions, descriptions, and list items.
  • Avoid both on long prose, code, and preformatted content.
  • Use font-variant-numeric: tabular-nums for counters, timers, prices, tables, and other updating numbers.

Font Smoothing

On macOS, apply antialiased font smoothing at the root layout when the project does not already do so:

css
html {  -webkit-font-smoothing: antialiased;  -moz-osx-font-smoothing: grayscale;}

Image Outlines

Images often need a subtle inset outline so their edges do not blur into the surface.

css
img {  outline: 1px solid rgba(0, 0, 0, 0.1);  outline-offset: -1px;}
@media (prefers-color-scheme: dark) {  img {    outline-color: rgba(255, 255, 255, 0.1);  }}

Use neutral black or white alpha outlines. Do not tint image outlines with the brand palette.

Motion

Use CSS transitions for interactive state changes because they can retarget when the user changes intent mid-motion. Reserve keyframes for staged one-shot entrances or loading sequences.

Good motion defaults:

  • Enter: combine opacity, small translateY, and optionally blur.
  • Exit: shorter and quieter than enter, usually 150ms.
  • Press: scale(0.96) for tactile buttons, with a way to disable it when the movement distracts.
  • Icon swaps: cross-fade with opacity, scale, and blur instead of instant visibility toggles.

Transition Scope

Never use transition: all. Specify the changed properties:

css
.button {  transition-property: transform, background-color, box-shadow;  transition-duration: 150ms;  transition-timing-function: ease-out;}

Use will-change only for first-frame stutter on compositor-friendly properties such as transform, opacity, and filter. Never use will-change: all.

Hit Areas

Interactive controls should have at least a 40x40px hit area, ideally 44x44px where the layout allows it. Expand with a pseudo-element when the visible icon is smaller, but do not let expanded hit areas overlap.

Review Output

When reviewing a UI polish pass, report concrete changes in before/after rows:

PrincipleBeforeAfter
Concentric radiusSame radius on parent and childParent radius accounts for padding
Tabular numbersCounter shifts as digits changeCounter uses tabular-nums
Transition scopetransition: allExplicit transition properties

Include file paths and properties when they are not obvious from the snippets. Omit principles that you checked but did not change.

Checklist

  • Nested rounded elements are optically coherent.
  • Icons are visually centered.
  • Buttons, cards, and popovers use borders or shadows for the right reason.
  • Headings and short text avoid awkward wrapping.
  • Dynamic numbers use tabular numerals.
  • Images have neutral outlines where needed.
  • Enter and exit animations are split, subtle, and interruptible where appropriate.
  • Buttons have tactile active states without exaggerated motion.
  • transition: all and will-change: all are absent.
  • Small controls still have usable hit areas.

來源與署名

來源:affaan-m/ECC位於pi/core/skills/make-interfaces-feel-better提交ef648e0

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架