{"id":20348984,"url":"https://github.com/malimirkec/clamp-it","last_synced_at":"2025-04-12T01:22:46.459Z","repository":{"id":260254493,"uuid":"866656883","full_name":"maliMirkec/clamp-it","owner":"maliMirkec","description":"CSS clamp() function generator.","archived":false,"fork":false,"pushed_at":"2025-01-23T09:03:21.000Z","size":15365,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T21:07:14.298Z","etag":null,"topics":["clamp","css","extension","visual-studio-code","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=starbist.clamp-it","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maliMirkec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-02T16:39:35.000Z","updated_at":"2025-02-20T09:04:44.000Z","dependencies_parsed_at":"2024-10-30T12:28:57.694Z","dependency_job_id":null,"html_url":"https://github.com/maliMirkec/clamp-it","commit_stats":null,"previous_names":["malimirkec/clamp-it"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliMirkec%2Fclamp-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliMirkec%2Fclamp-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliMirkec%2Fclamp-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maliMirkec%2Fclamp-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maliMirkec","download_url":"https://codeload.github.com/maliMirkec/clamp-it/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248502118,"owners_count":21114741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clamp","css","extension","visual-studio-code","vscode-extension"],"created_at":"2024-11-14T22:23:32.412Z","updated_at":"2025-04-12T01:22:46.453Z","avatar_url":"https://github.com/maliMirkec.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clamp It! VS Code Extension\n\n![clamp-it](https://raw.githubusercontent.com/maliMirkec/clamp-it/main/gfx/clamp-it.gif)\n\n**Clamp It!** is a Visual Studio Code extension that helps web developers easily generate CSS `clamp()` functions for responsive font sizing. This extension allows you to specify font sizes, viewport widths, and a base font size, automatically calculating the appropriate `clamp()` function in rem units.\n\n---\n\n\u003e **Breaking update: as of version 0.0.9, the base font size is the last parameter!**\n\n---\n\n## Features\n\n- **Responsive Font Sizes**: Generate `clamp()` functions based on specified font sizes, viewport widths, and base font sizes.\n\n- **Custom and Global Settings**: Set base font sizes and viewport limits either globally or per project.\n\n- **Flexible Input Order**: Accepts parameters in the following order: `mobileFontSize`, `desktopFontSize`, `viewportMin`, `viewportMax`, and `baseFontSize`.\n\n- **Easy Integration**: Quickly replace selected text in your code with the generated `clamp()` function.\n\n- **Comment Control**: Optionally include comments with the minimum and maximum values in the generated `clamp()` function. This feature can be enabled or disabled globally.\n\n## Installation\n\nSearch for **\"Clamp It!\"** in the Extensions view (Ctrl + Shift + X or Cmd + Shift + X) and install it from the Marketplace.\n\n## Usage\n\n1. **Select Text**: Highlight the text in the following format:\n\n```css\nmobileFontSize, desktopFontSize, viewportMin, viewportMax, baseFontSize\n```\n\nExample:\n\n```css\n16, 20, 600, 1200, 16\n```\n\n2. **Command Palette**: Open the command palette (Ctrl + Shift + P or Cmd + Shift + P), and type **\"Clamp it!\"** to execute the command.\n\n3. **Output**: The selected text will be replaced with a formatted `clamp()` function.\n\nExample output:\n\n```css\nclamp(1rem, calc(0.821rem + 0.476vw), 1.25rem)\n```\n\nIf the setting is enabled, the output will also include a comment:\n\n```css\nclamp(1rem, calc(0.821rem + 0.476vw), 1.25rem); /* min: 16px, max: 20px */\n```\n\n## Settings\n\n### Global Settings\n\n- `clampExtension.globalMinViewport`: Set the global minimum viewport size (default: 600).\n\n- `clampExtension.globalMaxViewport`: Set the global maximum viewport size (default: 1200).\n\n- `clampExtension.baseFontSize`: Set the global base font size (default: 16).\n\n- `clampExtension.showComments`: Show comments with min and max values in the generated clamp() function (default: false).\n\n### Local Project Settings\n\nYou can override the global settings for individual projects by adding them to your project's `.vscode/settings.json` file:\n\n```json\n{\n  \"clampExtension.globalMinViewport\": 500,\n  \"clampExtension.globalMaxViewport\": 1500,\n  \"clampExtension.baseFontSize\": 14,\n  \"clampExtension.showComments\": true\n}\n```\n\n## Development\n\nTo contribute to the development of this extension:\n\n1. **Clone the repository**:\n\n```sh\ngit clone https://github.com/yourusername/clamp-it.git\n\ncd clamp-it\n```\n\n2. **Install dependencies**:\n\n```sh\nnpm install\n```\n\n3. **Run the extension**:\n\nOpen the project in VS Code and press F5 to launch the extension in a new VS Code window.\n\n---\n\n\u003e Built with assistance of ChatGPT. ¯\\\\_(ツ)_/¯\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalimirkec%2Fclamp-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalimirkec%2Fclamp-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalimirkec%2Fclamp-it/lists"}