ToolCabana

Calculadora CSS de clamp

Gera tipografia ou espaçamento fluidos entre limites de viewport.

Favorites are saved in this browser. Find them in My favorites.

Calculadora CSS de clamp

Your input stays in this browser unless stated otherwise
Clear your input, files and result, and restore the default settings.
=

Make it yours

Adjust the values, then get your result.

Como usar Calculadora CSS de clamp

CSS clamp calculator creates a clamp() value that scales a font size or spacing linearly between a minimum and maximum pixel size across a viewport range. Enter both sizes and both viewport widths, which default to 16 to 32 px between 320 and 1280 px viewports, and get a calc() expression combining px and vw plus a live text preview.

  1. Digite os valores solicitados no painel de configurações.
  2. Ajuste a configuração básica e abra o modo avançado para opções de exportação e ajuste fino. A configuração personalizada continua ativa ao fechar o painel.
  3. Execute a calculadora CSS de clamp, revise a saída e use os controles disponíveis para copiar ou baixar.

O que esta ferramenta suporta

Gera tipografia ou espaçamento fluidos entre limites de viewport.

Fonte / espaçamento mínimos (px)
Range: 0 to 1000
Fonte / espaçamento máximos (px)
Range: 0 to 1000
Viewport mínimo (px)
Range: 1 to 10000
Viewport máximo (px)
Range: 1 to 10000

Limites e processamento

As imagens usam o limite existente de 32 megapixels. São permitidas até 100 imagens de origem onde houver suporte. O HTML colado é limitado a 200,000 caracteres; diagramas Mermaid a 20,000 caracteres e 300 linhas. A geração de SVG e PNG exige um navegador.

Perguntas frequentes

How do I calculate a fluid font size with CSS clamp?

The slope is the size difference divided by the viewport difference. The middle value becomes an intercept in px plus the slope times 100 in vw, so the size reaches the minimum at the small viewport and the maximum at the large one. The calculator does this for you.

Why does the clamp calculator output px instead of rem?

All inputs and outputs are in pixels, and the middle term combines px with vw rounded to six decimals. If your design system uses rem, divide the pixel values by your root font size after copying the result.

What causes the error that maximum viewport must exceed minimum?

The maximum viewport must be larger than the minimum viewport, and the maximum size cannot be smaller than the minimum size. Equal sizes are allowed and produce a fixed value. Swap the fields if you entered them in the wrong order.

Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

Quais são os limites de entrada?

As imagens usam o limite existente de 32 megapixels. São permitidas até 100 imagens de origem onde houver suporte. O HTML colado é limitado a 200,000 caracteres; diagramas Mermaid a 20,000 caracteres e 300 linhas. A geração de SVG e PNG exige um navegador.