Clamp Calculator — Fluid CSS
|
| Field | Description |
|---|---|
| Min Size / Max Size | Fluid value range |
| Min Viewport / Max Viewport | Viewport breakpoints |
| Output Unit | Output in rem or px |
| Output Format | CSS or Tailwind syntax |
Changes save automatically and persist across VS Code restarts.
Command Palette
Press Ctrl+Shift+P and type Clamp Calculator to open the calculator from the command palette.
Output Formats
CSS
clamp(1rem, 0.8571rem + 0.7143vw, 1.5rem)
Tailwind
[clamp(1rem,0.8571rem+0.7143vw,1.5rem)]
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Open Clamp Calculator | Ctrl+Alt+C |
| Open sidebar | Click icon in Activity Bar |
| Command palette | Ctrl+Shift+P → $clamp |
Customize shortcuts in File → Preferences → Keyboard Shortcuts (Ctrl+K Ctrl+S).
Requirements
- VS Code 1.85.0 or higher
Extension Settings
This extension contributes the following settings via the sidebar (no manual configuration needed):
- Min/Max viewport widths and units
- Size units (px/rem)
- Output unit (px/rem)
- Output format (CSS/Tailwind)
Known Issues
- None reported yet. Open an issue if you find one.
Release Notes
0.0.1
Initial release:
- Fluid clamp() calculator with
Ctrl+Alt+Cshortcut - Persistent sidebar configuration
- CSS and Tailwind output formats
- Real-time preview at common viewports
- Automatic unit conversion (px ↔ rem)
About
Built for responsive web developers who need reliable, repeatable fluid typography and layout values.
Repository: github.com/your-username/clamp-calculator
