RevealTheme logo

Generador de CSS Clamp()

Genera valores CSS fluidos y responsivos con clamp(). Escala suavemente entre tamaños mínimo y máximo a lo largo de los rangos del viewport.

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

Cómo usar esta herramienta

  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.

¿Qué es el Generador de CSS Clamp()?

La función CSS clamp(mín, preferido, máx) mantiene un valor acotado a la vez que le permite escalar de forma fluida dentro del rango. Perfecta para tipografía responsiva que crece suavemente con el ancho del viewport en lugar de saltar en los puntos de ruptura. Esta herramienta calcula la fórmula correcta del valor preferido a partir de tus tamaños de fuente mínimo/máximo y los anchos del viewport.

Casos de uso comunes

  • 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.

Preguntas frecuentes

¿Compatibilidad con navegadores?
clamp() funciona en todos los navegadores desde 2020: es totalmente seguro usarlo en producción.

Herramientas relacionadas