DSDesignSkill
|

/디자인스킬/CSS 아키텍처 스킬

SKILL.md

CSS / Styling Architecture

How to keep styles scalable and responsive without a utility-first system doing it for you.

  • Methodologies: BEM (block__element--modifier naming), ITCSS (inverted-triangle layering by specificity/reach), and CUBE CSS (Composition, Utility, Block, Exception) for scaling stylesheets when *not* on a utility-first framework.
  • Fluid & Responsive:
  • Mobile-first — start from the smallest viewport, layer up.
  • `clamp()` — fluid type and space that scale between a min and max without breakpoints.
  • Container queries — component-level responsiveness based on the *container's* size, not the viewport. The component adapts wherever it's placed.

How to apply

  • On a custom (non-utility) codebase, pick one methodology and hold the line — consistency beats the "best" choice.
  • Reach for container queries when a component must adapt to its slot (sidebar vs main), not the whole screen — media queries can't express that.
  • Use clamp() for type and spacing scales to cut breakpoint count and avoid stepwise jumps.
  • Start mobile-first; treat larger screens as progressive enhancement.

설명

스타일시트가 커질 때 무너지지 않도록 방법론과 유동 반응형 기법을 정리한 지침입니다. 클래스 네이밍, 계층, 토큰 연결 방식을 함께 다룹니다.

변경 이력

v1.0.02026-07-27

최초 공개