크기
크기 (Size)
Primer가 제공하는 모든 크기 관련 CSS 변수 개요입니다. base, border, breakpoint, viewport, layout, control, overlay 등 원자 단위의 크기 토큰을 한데 모아 각 변수의 출력값과 실제 소스 값(rem 기준)을 보여줍니다. 해상도나 맥락에 관계없이 일관된 간격과 컨트롤 크기를 만들고 싶을 때 이 변수들을 기준으로 삼으면 됩니다.
출처: 문서
본문
이 페이지는 현재 사용 가능한 크기 관련 CSS 변수를 항목별로 정리한 참조입니다. 각 변수는 CSS로 바로 사용할 수 있고, 출력값은 브라우저에서 실제로 적용되는 값이며, 소스 값은 디자인 토큰 기반의 원본 정의입니다.
Base
기본 크기 변수는 음수 값부터 양수 값까지 2px 단위로 확장되며, -48px부터 128px 범위를 다룹니다.
--base-size-negative-48: -3rem / -48px
--base-size-negative-44: -2.75rem / -44px
--base-size-negative-40: -2.5rem / -40px
--base-size-negative-36: -2.25rem / -36px
--base-size-negative-32: -2rem / -32px
--base-size-negative-28: -1.75rem / -28px
--base-size-negative-24: -1.5rem / -24px
--base-size-negative-20: -1.25rem / -20px
--base-size-negative-16: -1rem / -16px
--base-size-negative-12: -0.75rem / -12px
--base-size-negative-8: -0.5rem / -8px
--base-size-negative-6: -0.375rem / -6px
--base-size-negative-4: -0.25rem / -4px
--base-size-negative-2: -0.125rem / -2px
--base-size-2: 0.125rem / 2px
--base-size-4: 0.25rem / 4px
--base-size-6: 0.375rem / 6px
--base-size-8: 0.5rem / 8px
--base-size-12: 0.75rem / 12px
--base-size-16: 1rem / 16px
--base-size-20: 1.25rem / 20px
--base-size-24: 1.5rem / 24px
--base-size-28: 1.75rem / 28px
--base-size-32: 2rem / 32px
--base-size-36: 2.25rem / 36px
--base-size-40: 2.5rem / 40px
--base-size-44: 2.75rem / 44px
--base-size-48: 3rem / 48px
--base-size-64: 4rem / 64px
--base-size-80: 5rem / 80px
--base-size-96: 6rem / 96px
--base-size-112: 7rem / 112px
--base-size-128: 8rem / 128px
Border
테두리 관련 크기 변수입니다.
--borderWidth-default: 0.0625rem / {borderWidth.thin}
--borderWidth-thick: 0.125rem / 2px
--borderWidth-thicker: 0.25rem / 4px
--borderWidth-thin: 0.0625rem / 1px
--boxShadow-thick: inset 0 0 0 0.125rem
--boxShadow-thicker: inset 0 0 0 0.25rem
--boxShadow-thin: inset 0 0 0 0.0625rem
--borderRadius-small: 0.1875rem / 3px
--borderRadius-medium: 0.375rem / 6px
--borderRadius-large: 0.75rem / 12px
--borderRadius-full: 624.9375rem / 9999px
--borderRadius-default: 0.375rem / {borderRadius.medium}
--outline-focus-width: 0.125rem / {focus.outline-width}
--outline-focus-offset: -0.125rem / {focus.outline-offset}
Breakpoints
반응형 구간을 나누는 뷰포트 너비 변수입니다.
--breakpoint-xsmall: 20rem / 320px
--breakpoint-small: 34rem / 544px
--breakpoint-medium: 48rem / 768px
--breakpoint-large: 63.25rem / 1012px
--breakpoint-xlarge: 80rem / 1280px
--breakpoint-xxlarge: 87.5rem / 1400px
Viewport
미디어 쿼리 범위를 나타내는 변수입니다.
--viewportRange-narrow: (max-width: calc(48rem - 0.02px))
--viewportRange-narrowLandscape: ((max-width: calc(63.25rem - 0.02px)) and (max-height: calc(34rem - 0.02px)) and (orientation: landscape))
--viewportRange-regular: (min-width: 48rem)
--viewportRange-wide: (min-width: 87.5rem)
--viewportRange-landscape: (orientation: landscape)
--viewportRange-portrait: (orientation: portrait)
Layout
스택(Stack)과 컨트롤(Control) 배치에 쓰는 간격·패딩 변수입니다.
--stack-gap-condensed: 0.5rem / {base.size.8}
--stack-gap-normal: 1rem / {base.size.16}
--stack-gap-spacious: 1.5rem / {base.size.24}
--stack-padding-condensed: 0.5rem / {base.size.8}
--stack-padding-normal: 1rem / {base.size.16}
--stack-padding-spacious: 1.5rem / {base.size.24}
Regular control stack sizes
--controlStack-small-gap-condensed: 0.5rem / {base.size.8}
--controlStack-small-gap-auto: 0.5rem / {base.size.8}
--controlStack-small-gap-spacious: 1rem / {base.size.16}
--controlStack-medium-gap-condensed: 0.5rem / {base.size.8}
--controlStack-medium-gap-auto: 0.5rem / {base.size.8}
--controlStack-medium-gap-spacious: 0.75rem / {base.size.12}
--controlStack-large-gap-condensed: 0.5rem / {base.size.8}
--controlStack-large-gap-auto: 0.5rem / {base.size.8}
--controlStack-large-gap-spacious: 0.75rem / {base.size.12}
Responsive control stack sizes
포인터(coarse/fine)에 따라 값이 달라지는 반응형 갭입니다.
--controlStack-small-gap-auto: 1rem (coarse) / 0.5rem (fine)
--controlStack-medium-gap-auto: 0.75rem (coarse) / 0.5rem (fine)
--controlStack-large-gap-auto: 0.75rem (coarse) / 0.5rem (fine)
XSmall control sizes
--control-xsmall-gap: 0.25rem / {base.size.4}
--control-xsmall-paddingBlock: 0.125rem / 2px
--control-xsmall-paddingInline-condensed: 0.25rem / {base.size.4}
--control-xsmall-paddingInline-normal: 0.5rem / {base.size.8}
--control-xsmall-paddingInline-spacious: 0.75rem / {base.size.12}
--control-xsmall-size: 1.5rem / {base.size.24}
Small control sizes
--control-small-gap: 0.25rem / {base.size.4}
--control-small-paddingBlock: 0.25rem / {base.size.4}
--control-small-paddingInline-condensed: 0.5rem / {base.size.8}
--control-small-paddingInline-normal: 0.75rem / {base.size.12}
--control-small-paddingInline-spacious: 1rem / {base.size.16}
--control-small-size: 1.75rem / {base.size.28}
Medium control sizes
--control-medium-gap: 0.5rem / {base.size.8}
--control-medium-paddingBlock: 0.375rem / 6px
--control-medium-paddingInline-condensed: 0.5rem / {base.size.8}
--control-medium-paddingInline-normal: 0.75rem / {base.size.12}
--control-medium-paddingInline-spacious: 1rem / {base.size.16}
--control-medium-size: 2rem / {base.size.32}
Large control sizes
--control-large-gap: 0.5rem / {base.size.8}
--control-large-paddingBlock: 0.625rem / 10px
--control-large-paddingInline-condensed: 0.5rem / {base.size.8}
--control-large-paddingInline-normal: 0.75rem / {base.size.12}
--control-large-paddingInline-spacious: 1rem / {base.size.16}
--control-large-size: 2.5rem / {base.size.40}
XLarge control sizes
--control-xlarge-gap: 0.5rem / {base.size.8}
--control-xlarge-paddingBlock: 0.875rem / 14px
--control-xlarge-paddingInline-condensed: 0.5rem / {base.size.8}
--control-xlarge-paddingInline-normal: 0.75rem / {base.size.12}
--control-xlarge-paddingInline-spacious: 1rem / {base.size.16}
--control-xlarge-size: 3rem / {base.size.48}
Overlay
오버레이(팝오버, 메뉴 등)의 크기·패딩 관련 변수입니다.
--overlay-borderRadius: 0.375rem / {borderRadius.medium}
--overlay-offset: 0.25rem / 4px
--overlay-height-small: 16rem / 256px
--overlay-height-medium: 20rem / 320px
--overlay-height-large: 27rem / 432px
--overlay-height-xlarge: 37.5rem / 600px
--overlay-width-xsmall: 12rem / 192px
--overlay-width-small: 20rem / 320px
--overlay-width-medium: 30rem / 480px
--overlay-width-large: 40rem / 640px
--overlay-width-xlarge: 60rem / 960px
--overlay-padding-condensed: 0.5rem / {base.size.8}
--overlay-padding-normal: 1rem / {base.size.16}
--overlay-paddingBlock-condensed: 0.25rem / {base.size.4}
--overlay-paddingBlock-normal: 0.75rem / {base.size.12}
더 알아보기 (Learn more)
- Primer 토큰 이름 (Token names) — 변수 네이밍 규칙 살펴보기
- Primer 타이포그래피 (Typography) — 폰트 관련 크기 토큰
- Primer 프리미티브 홈 — 크기 외의 다른 프리미티브 기준