Fluid Typography Scale Calculator - Online clamp() Generator
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
UD5 Toolkit
Test clamp(), min(), max() in real-time with visual preview
clamp() is a CSS math function that clamps a value between an upper and lower bound. It takes three parameters: MIN, PREFERRED, and MAX. The function resolves to the preferred value as long as it stays between the min and max boundaries. If the preferred value drops below the minimum, it returns the minimum. If it exceeds the maximum, it returns the maximum. This is incredibly useful for responsive design — for example, clamp(1rem, 2vw + 0.5rem, 2rem) creates fluid typography that scales with the viewport but never goes below 1rem or above 2rem.
min() selects the smallest value from its arguments, while max() selects the largest. These are extremely useful for responsive layouts. For instance, width: min(100%, 600px) ensures an element never exceeds 600px but can shrink on smaller screens. Conversely, width: max(300px, 50%) guarantees a minimum width of 300px while allowing growth on larger screens. Both functions can accept two or more comma-separated values with mixed units.
px, rem, em with relative units like vw, vh, %, and even other functions like calc(). For example: clamp(280px, 40vw, 900px) mixes pixels with viewport width. The browser handles the conversion automatically. This makes them incredibly powerful for creating fluid, responsive designs without media queries.
font-size: clamp(1rem, 2.5vw, 2rem) — text scales smoothly between screen sizeswidth: clamp(300px, 50vw, 800px) — content area adapts fluidlywidth: min(100%, 1200px) — full-width on mobile, capped on desktoppadding: max(16px, 3vw) — ensures breathing room on all devicesheight: clamp(200px, 30vh, 500px) — hero images that adapt to viewport heightmin(), max(), and clamp() enjoy excellent browser support. They are supported in all modern browsers including Chrome (79+), Firefox (75+), Safari (13.1+), and Edge (79+). They've been available since 2019-2020 across major browsers. For older browsers like Internet Explorer, they are not supported, but given IE's end-of-life status, CSS math functions are considered production-ready for virtually all modern web projects.
clamp(MIN, PREF, MAX) is essentially shorthand for max(MIN, min(PREF, MAX)). Both expressions yield identical results, but clamp() is more readable and concise. Use clamp() when you need both a lower and upper boundary. Use standalone min() when you only need an upper limit (e.g., preventing overflow), and standalone max() when you only need a lower limit (e.g., ensuring a minimum clickable area).
calc(). For example: clamp(200px, calc(30vw + 50px), 700px) adds 50px to the viewport-based preferred value. You can also nest them: min(max(300px, 50vw), 800px). This composability makes them extremely flexible for complex responsive behaviors without JavaScript. The browser evaluates nested functions from the inside out, just like in regular programming.
Define min and max font sizes and viewport widths. Generate a complete fluid type scale using CSS clamp() for all headings.
Enter min and max font sizes and viewport widths to generate a perfect CSS clamp() expression. Fluid typography without media queries.
Design a layout where nested grids share track sizes with their parent via subgrid. Copy the complete CSS.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Limit browser gestures on an element: pan‑x, pinch‑zoom, manipulation. Draw on a canvas to test. Mobile dev helper.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Generate a random HTML/CSS card with different box model properties. Inspect and guess the size. For learners.
Design a button or card that glows on hover. Adjust shadow color, spread, and transition. Copy the CSS. Rich UI.
Create a realistic letterpress (debossed) text effect using CSS text‑shadow and background. Adjust depth and light direction. Copy code.
Experiment with CSS container queries. Resize a container and see the styles change according to its size, not the viewport. Learn the new spec.
Paste your CSS and sort the properties of each rule alphabetically or by concentric groups. Keep your stylesheets consistent without a build step.
Generate a subtle noise/grain texture as a CSS background pattern. Adjust opacity and size. For that film look.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Upload two images and apply CSS blend modes (multiply, screen, overlay, etc.). See the result and copy the filter CSS. Pure frontend.
Add print styles like removing backgrounds, adding page breaks, setting margins. See print preview instantly.
Create a pure CSS countdown timer with a flipping number effect. Adjust duration and style. No JavaScript needed for display.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Create a glowing or rotating border animation around an element. Copy the CSS keyframes. Pure CSS magic.
Create a custom HTML/CSS progress bar with percentage, colors, and animation. Copy the code. Modern UI element.
Design a realistic neon sign text with multiple layers of glow. Copy the CSS and HTML. Perfect for headers.
A replica of the famous Flexbox Froggy game: solve alignment puzzles by writing CSS. Progress saved locally. Fun frontend learning.
Fetch a website's CSS and extract :root custom properties (‑‑color) to reveal its design token palette. For learning and inspiration.
Recreate the target CSS linear gradient by adjusting stops and colors. A unique game for front‑end developers to master gradients.
Browse and search all Font Awesome 6 icons with preview, class name, and unicode. Copy the HTML snippet. Perfect for web developers.
Create text with a gradient fill using CSS background-clip. Configure colors and direction. Copy the code. Works in modern browsers.
A complete, searchable list of all 140+ named HTML/CSS colors with their hex codes and color previews. Click to copy code. Essential web reference.
Visually experiment with Flexbox container and item properties. See the layout update in real time and copy the CSS. Learn by doing, fully interactive.
Minify JavaScript and CSS code to reduce file size for production. Remove whitespace and comments instantly. Run locally, your code stays private.