{"id":16484458,"url":"https://github.com/winston0410/bewater","last_synced_at":"2026-01-20T11:33:01.657Z","repository":{"id":45061279,"uuid":"285799133","full_name":"winston0410/bewater","owner":"winston0410","description":"A PostCSS plugin that helps you automatically apply `clamp()` to values to achieve a fluid design efficently.","archived":false,"fork":false,"pushed_at":"2022-01-11T20:17:18.000Z","size":1058,"stargazers_count":2,"open_issues_count":21,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-18T21:43:18.332Z","etag":null,"topics":["bewater","postcss","postcss-plugin","postcss-sparrow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winston0410.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-07T10:11:14.000Z","updated_at":"2020-12-01T01:36:31.000Z","dependencies_parsed_at":"2022-09-02T22:51:17.455Z","dependency_job_id":null,"html_url":"https://github.com/winston0410/bewater","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/winston0410/bewater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fbewater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fbewater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fbewater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fbewater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winston0410","download_url":"https://codeload.github.com/winston0410/bewater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fbewater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28602463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T10:46:13.255Z","status":"ssl_error","status_checked_at":"2026-01-20T10:42:51.865Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bewater","postcss","postcss-plugin","postcss-sparrow"],"created_at":"2024-10-11T13:17:10.912Z","updated_at":"2026-01-20T11:33:01.642Z","avatar_url":"https://github.com/winston0410.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Be water\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ff6544cbff114d008f05708e334f987a)](https://www.codacy.com/manual/winston0410/bewater?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=winston0410/bewater\u0026amp;utm_campaign=Badge_Grade) [![Known Vulnerabilities](https://snyk.io/test/github/winston0410/bewater/badge.svg?targetFile=package.json)](https://snyk.io/test/github/winston0410/bewater?targetFile=package.json) [![Maintainability](https://api.codeclimate.com/v1/badges/6822f950185d354940ba/maintainability)](https://codeclimate.com/github/winston0410/bewater/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/6822f950185d354940ba/test_coverage)](https://codeclimate.com/github/winston0410/bewater/test_coverage)\n\n**Be water, be fluid, be responsive.**\n\n![Cover image for Be water](/gilles-rolland-monnet-water.jpg)\n\nA PostCSS plugin that helps you automatically apply `clamp()` to values to achieve a fluid design efficently.\n\nThis plugin uses [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow), [PostCSS Sparrow Units Filter](https://www.npmjs.com/package/postcss-sparrow-units-filter) and [PostCSS Sparrow Props Filter](https://www.npmjs.com/package/postcss-sparrow-props-filter) under the hood for filtering CSS declarations.\n\n```css\n/* Before transformation */\np {\n  font-size: 30px;\n  padding: 15px;\n}\n\n```\n\n```javascript\n//postcss.config.js\nmodule.exports = {\n  plugins: [\n    //Other plugins...\n\n    require('postcss-sparrow')({\n      transformations: [\n        {\n          selectors: ['*'],\n          inclusion: true,\n          callbacks: [\n            require('bewater')(\n              {\n                props: {\n                  props: ['font-size'],\n                  inclusion: true\n                },\n                units: {\n                  units: ['*'],\n                  inclusion: true\n                },\n                scale: 1.5, //Multiplier for the original value, and the product will be used as the 3rd param for clamp()\n                changeRate: '4vw' //The rate for the value to change.  This value will be used as the 2nd param for clamp()\n              }\n            )\n          ]\n        }\n      ]\n    })\n  ]\n}\n```\n\n```css\n/* After transformation */\np {\n  font-size: clamp(30px, 4vw, 45px);\n  padding: 15px;\n}\n\n```\n\n## Installation\n\nThis plugin require you to use [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow) for matching with selectors you want.\n\nDownload both `postcss-sparrow` and this plugin through NPM.\n\n```shell\n\nnpm i postcss postcss-sparrow bewater\n\n```\n\nThen import this plugin as the callback for [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow).\n\n## API Reference\n\n### `options.props` : Object\n\nFilter options for filtering CSS declaration by its prop.  Read the API reference of [PostCSS Sparrow Props Filter](https://www.npmjs.com/package/postcss-sparrow-props-filter#api-reference) for more details. `props` defaults to `[*]` and `inclusion` defaults to `true`.\n\n### `options.units` : Object\n\nFilter options for filtering CSS declaration by its prop.  Read the API reference of [PostCSS Sparrow Units Filter](https://www.npmjs.com/package/postcss-sparrow-units-filter#api-reference) for more details. `units` defaults to `[*]` and `inclusion` defaults to `true`.\n\n### `options.scale` : Number\n\nMultiplier for the original value, and the product will be used as the 3rd param for `clamp()`.  Default to `2`.\n\n### `options.changeRate` : String\n\nThe rate for the value to change.  This value will be used as the 2nd param for `clamp()`. Default to `2vw`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston0410%2Fbewater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinston0410%2Fbewater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston0410%2Fbewater/lists"}