본문으로 건너뛰기
cccskills
무료GitHub에 공개

surface-separation

Set a surface apart by one means — border, elevation or fill — and keep opacity for state. Use when designing cards, panels, list rows, toolbars or any container.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Surface Separation

A surface — a card, a panel, a toolbar, a row — needs to read as distinct from whatever sits behind it. There are exactly three ways to achieve that, and the mistake is almost always using more than one at full strength rather than choosing badly between them.

Pick One Strategy Per Surface

StrategyMechanismReads asBest for
Border1px line at the boundaryPrecise, drawn, documentaryDense UI, tables, forms, anything where the edge itself carries meaning
ElevationShadow implying heightFloating, temporary, aboveModals, dropdowns, popovers, drag states
FillContrasting background toneGrouped, embedded, part of the pageSections, sidebars, alternating rows, inline callouts

Each answers a different question. A border says where the surface ends. An elevation says how far above the page it sits. A fill says what it belongs to. Choose based on which question the user actually has.

The rule: never combine all three on the same surface. A card that carries a visible border, a drop shadow, and a background tone distinct from the page is stating its boundary three times. Nothing is emphasised because everything is. This is the most common single cause of a UI that someone describes as "busy" or "heavy" without being able to point at why.

The Legitimate Pair

Border and elevation together are correct in one specific case: a light surface on a light page, where a subtle shadow alone washes out and the edge goes fuzzy. Here the border defines the boundary and the shadow supplies the depth — they do different jobs. See [[elevation-and-depth]] for the shadow scale and the border tone that pairs with it.

What keeps this to two signals is that the surface fill stays at or near the page tone. The moment you also push the background a clear step away, the edge is being stated a third time.

Nesting

A surface inside a surface should change strategy, not intensify the same one. A bordered card containing bordered rows produces a grid of lines with no hierarchy. Use a fill shift for the inner rows, or drop the inner borders and rely on spacing — see [[gestalt-ui-organisation]] for when proximity alone is enough to group.

Depth of nesting is the real constraint. Past two levels of visible separation, no strategy reads clearly. Flatten the structure instead.

Opacity Is a State, Not a Tint

Opacity communicates that an element is temporarily not fully available: disabled, loading, pending, dragging. That is its entire job in a UI.

.btn:disabled     { opacity: 0.4; }
.card.is-loading  { opacity: 0.7; }
.row.is-dragging  { opacity: 0.5; }

Reserving it for this makes it legible. When opacity appears for any other reason, the signal stops meaning anything.

Never Tint With Transparency

Reaching for rgba(brand, 0.1) or opacity: 0.6 to produce a lighter shade of a colour is the anti-pattern. Define the tint as a real token instead:

/* Wrong — the rendered colour depends on whatever is behind it */
.badge { background: rgba(37, 99, 235, 0.12); }

/* Right — a resolved token with a known value */
.badge { background: var(--color-brand-50); }

Three things break with the transparent version:

  1. The colour is not knowable. It resolves against whatever sits behind it, which changes with the parent, the theme, and the scroll position. Two instances of the same component render as different colours.
  2. Contrast cannot be verified. WCAG ratios are computed between two concrete colours. A translucent layer has no concrete colour until it composites, so no automated check can confirm the text on it is readable — and it will pass in one context and fail in another.
  3. The design system loses the value. A tint that exists only as an alpha multiplier is not a token. It cannot be referenced, exported, versioned, or swapped per theme.

Derive tints algorithmically from the brand colour and store them as tokens — [[algorithmic-color-palette]] covers deriving a full ramp from one or two source colours.

Translucency on Translucency

The failure compounds when a translucent element sits on another translucent element. Each layer multiplies against the last, so the final rendered colour depends on the whole chain beneath it — and nobody knows that chain while authoring the component.

Never set opacity on an element whose background-color already carries an alpha channel. If both appear on the same component, one of them is doing the wrong job: either the background should be an opaque token, or the opacity should be a state and the background should not be translucent.

Glass and frosted effects are the deliberate exception, because unpredictable background is the point. They come with a cost: the text on them needs its own opaque backing, or a contrast guarantee that holds against the worst-case backdrop. Do not let a glass surface carry body copy without one.

Disabled Is the Exception That Proves It

Disabled elements are exempt from WCAG contrast minimums, which is exactly why low opacity is correct there and nowhere else — it is the one place where deliberately unreadable is the intended message. Opacity alone is still not enough to communicate disabled: pair it with cursor: not-allowed and a non-interactive state. [[button-states]] has the full state matrix.

Checklist

  • Does each surface use one separation strategy, or a border/elevation pair with a page-tone fill?
  • Is any surface carrying a border, a shadow, and a distinct fill at once?
  • Does nested separation change strategy rather than repeat it, and stop at two levels?
  • Is every opacity value in the codebase attached to a state — disabled, loading, dragging?
  • Are all tints real tokens rather than alpha multipliers?
  • Does any component set opacity on top of an already-translucent background?
  • Does text on a glass surface have an opaque backing or a worst-case contrast guarantee?

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Derive a full UI palette from one or two brand colours — state variants, brand-tinted greys, semantic colours. Use when building or expanding a colour system.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

app-shell

무료

Top bar, sidebar rail, app launcher, tenant and environment cue, status bar. Use when designing the persistent shell, a collapsible sidebar, or navigation between apps behind one login.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

Product visuals must show the real product with real data. Use when building landing pages, hero sections, screenshots or demo panels.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

Shape language across type, radius and icons carries brand personality. Use when starting a design system, picking icons or radius tokens, or reviewing visual consistency.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

Rest, hover, active, focus, disabled and loading states, derived from the base colour. Use when designing buttons, links, inputs or any clickable component.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

Rebuild a live web page 1:1 from measurement into Figma, Penpot or code, then verify it. Use when reproducing a page or checking a rebuild against the original.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

dembrandt/dembrandt-skills1512026년 10월 22일 업데이트

dembrandt의 스킬 모두 보기

이 스킬의 문제 신고