Написать в Max Telegram

Калькулятор CSS clamp

Задайте значение на узком и на широком экране — получите готовый clamp() для плавного масштабирования между ними. Результат обновляется на ходу.

 

Как это работает

Между двумя ширинами экрана значение растёт линейно, за их пределами — держится на минимуме или максимуме без «прыжков». clamp(МИН, ПРЕДПОЧТИТЕЛЬНОЕ, МАКС) — первое и третье значения задают нижнюю и верхнюю границу, среднее — формула из фиксированной части и vw (процента от ширины экрана), которая и даёт плавность. Подставьте результат прямо в CSS вместо обычного значения свойства.

Зачем rem, а не px

Результат в rem учитывает масштаб шрифта, который пользователь задал в браузере (у людей со слабым зрением он часто увеличен) — сохраняется доступность. px — вариант для свойств, где это не критично (например, gap между карточками), или если так удобнее интегрировать в существующий CSS.

Ограничения

Минимальная ширина экрана должна быть меньше максимальной — иначе формула не определена (деление на ноль), инструмент покажет ошибку вместо результата. Значения могут расти или убывать с шириной экрана — работает в обе стороны.

Калькулятор CSS clamp() онлайн — бесплатно

Пригодится для адаптивной типографики и отступов без брейкпоинтов — одна строка CSS вместо набора медиазапросов под каждый размер экрана. Ничего никуда не отправляется — всё считается в браузере.

About responsive typography Can scale smoothly Clamp function calculator Clamp value generator Convert from pixels Convert to rem Copy generated formula Design and flexibility Fixed or flexible Fluid typography formula Font-size value generator Formula that adjusts smoothly How scaling works It scales smoothly Max value limit Min value limit Pixels or rem Result is calculated Scale and readability Scale from base value Scale to screen width Scaling is smooth Spacing and typography The browser calculation The scaling formula The typography range The value preview This calculates proportions Viewport width calculator You choose values You control proportions Your typography settings Calculated by screen width Clamp for smooth scaling Clamp with dynamic values CSS for responsive layouts CSS for scalable typography CSS sizing formula CSS typography calculator CSS with relative sizing Fluid typography generator It keeps proportions It scales smoothly Max value limit Maximum readable size Min value calculator Minimum font size Pixels or rem units Preferred value formula Preview at different widths Range of font sizes Scaling on mobile screens Text scaling preview Viewport width calculation Your custom rhythm You tune proportions You define thresholds Width and height balance Viewport rendering tester Viewport dimension tracker Viewport breakpoint map Values remain proportional Values across breakpoints Value near minimum boundary Value near maximum boundary Use adaptive units Typography rhythm guide Typographic progression generator Tool parameter calculator This supports accessibility This improves readability The visual hierarchy The typographic rhythm The sizing formula The interpolation curve The component system The adaptive scale Templates for interfaces Switch to dense mode Spacing and rhythm Sizing preset generator Size reference table Size range control Size progression curve Settings for developers Scaled by proportion Scale to container bounds Responsive preset generator Respond to resize events Rendering in browsers Preview adaptive proportions Preferred sizing profile Precision in interfaces Padding adaptive preset Output is deterministic Modular sizing tools Modular ratio generator Min boundary setting Media query helper Max upper threshold Margin and gap control Logic that preserves rhythm Layout and hierarchy Labels with proportional growth How resizing behaves Guidance for widgets Gradient workflow tools Formula for scaling Font-size adaptive rule Font optical balance Fluid dimension progression Fit to narrow panels Desktop and handset scaling CSS adaptive stylesheet Contrast and legibility Components with adaptive rhythm Compact or spacious rhythm Colors and harmony Clamp scalable headings Clamp dynamic type Cards with flexible gaps Can reduce jumps Behavior is consistent Behavior in production All dimensions remain flexible Align to modular grid Adjust to device rotation Adaptive equation generator Adapt to compact displays
Показать