RevealTheme logo

CSS Clamp() 생성기

clamp()로 유동적이고 반응형인 CSS 값을 생성합니다. 뷰포트 범위에 걸쳐 최소 크기와 최대 크기 사이를 부드럽게 조정합니다.

font-size: clamp(16px, 13.0909px + 0.9091vw, 24px);

이 도구 사용 방법

  1. 1

    Enter the minimum size in pixels (the value at and below your small viewport).

  2. 2

    Enter the maximum size in pixels (the value at and above your large viewport).

  3. 3

    Set the min and max viewport widths in pixels that define where scaling starts and stops.

  4. 4

    Read the generated clamp() declaration and click Copy to paste it into your stylesheet.

CSS Clamp() 생성기란 무엇인가요?

CSS clamp(최소, 선호, 최대) 함수는 값을 일정 범위 내로 제한하면서도 그 범위 안에서 유동적으로 조정되도록 합니다. 중단점(breakpoint)에서 값이 갑자기 튀는 대신 뷰포트 너비에 따라 부드럽게 커지는 반응형 타이포그래피에 안성맞춤입니다. 이 도구는 최소/최대 글꼴 크기와 뷰포트 너비를 바탕으로 선호 값의 올바른 공식을 계산합니다.

일반적인 사용 사례

  • Building fluid headings that grow from 24px on mobile to 48px on desktop without writing media-query breakpoints.

  • Setting responsive body copy that stays readable between a 320px phone and a 1200px laptop.

  • Scaling section padding or gap values fluidly so layouts breathe proportionally across screen sizes.

  • Replacing a stack of font-size overrides at 480px, 768px, and 1024px with one clamp() declaration.

  • Generating clamp() values for a design system so spacing and type scale consistently from one formula.

  • Quickly checking the px and vw math for a fluid value you sketched out in a design tool like Figma.

자주 묻는 질문

브라우저 호환성은 어떤가요?
clamp()는 2020년부터 모든 브라우저에서 작동합니다. 프로덕션에서 사용하기에 전혀 문제가 없습니다.

관련 도구