{"id":15292567,"url":"https://github.com/hnzycfcfed/styled-px2vw","last_synced_at":"2025-08-21T04:31:13.191Z","repository":{"id":54562140,"uuid":"153404974","full_name":"hnzycfcfed/styled-px2vw","owner":"hnzycfcfed","description":"Extension of styled-components with features for convert px to vw units","archived":false,"fork":false,"pushed_at":"2020-08-13T03:56:58.000Z","size":320,"stargazers_count":90,"open_issues_count":5,"forks_count":20,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T18:08:51.134Z","etag":null,"topics":["css","css-in-js","frontend","px-to-vw","px2vw","react","styled-components","styled-px2vw"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hnzycfcfed.png","metadata":{"files":{"readme":"README-zh_CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-17T06:16:12.000Z","updated_at":"2024-09-06T06:55:52.000Z","dependencies_parsed_at":"2022-08-13T19:50:11.223Z","dependency_job_id":null,"html_url":"https://github.com/hnzycfcfed/styled-px2vw","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hnzycfcfed/styled-px2vw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnzycfcfed%2Fstyled-px2vw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnzycfcfed%2Fstyled-px2vw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnzycfcfed%2Fstyled-px2vw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnzycfcfed%2Fstyled-px2vw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnzycfcfed","download_url":"https://codeload.github.com/hnzycfcfed/styled-px2vw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnzycfcfed%2Fstyled-px2vw/sbom","scorecard":{"id":467000,"data":{"date":"2025-08-11","repo":{"name":"github.com/hnzycfcfed/styled-px2vw","commit":"3fbc2205ae470aebc550741f5a88df2fee29c1c8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 3/17 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T12:48:06.633Z","repository_id":54562140,"created_at":"2025-08-19T12:48:06.633Z","updated_at":"2025-08-19T12:48:06.633Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271425062,"owners_count":24757400,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["css","css-in-js","frontend","px-to-vw","px2vw","react","styled-components","styled-px2vw"],"created_at":"2024-09-30T16:18:50.805Z","updated_at":"2025-08-21T04:31:12.902Z","avatar_url":"https://github.com/hnzycfcfed.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# styled-px2vw ✨\n[![Travis (.org)](https://img.shields.io/travis/hnzycfcfed/styled-px2vw.svg?style=flat-square)](https://travis-ci.org/hnzycfcfed/styled-px2vw)\n[![npm](https://img.shields.io/npm/v/styled-px2vw.svg?style=flat-square)](https://www.npmjs.com/package/styled-px2vw)\n[![npm](https://img.shields.io/npm/dm/styled-px2vw.svg?style=flat-square)](https://www.npmjs.com/package/styled-px2vw)\n[![David](https://img.shields.io/david/hnzycfcfed/styled-px2vw.svg?style=flat-square)](https://www.npmjs.com/package/styled-px2vw)\n[![David](https://img.shields.io/david/dev/hnzycfcfed/styled-px2vw.svg?style=flat-square)](https://www.npmjs.com/package/styled-px2vw)\n[![GitHub stars](https://img.shields.io/github/stars/hnzycfcfed/styled-px2vw.svg?style=flat-square)](https://github.com/hnzycfcfed/styled-px2vw/stargazers)\n\n在 [styled-components](https://www.styled-components.com/) 基础上实现了 px -\u003e vw 单位转换的功能 \u003cbr\u003e\n详细文档请参考： [styled-components.com/docs](https://www.styled-components.com/docs)\n\n快速访问:\n\n- [styled-px2vw ✨](#styled-px2vw-%E2%9C%A8)\n  - [重要提示](#%E9%87%8D%E8%A6%81%E6%8F%90%E7%A4%BA)\n  - [动机](#%E5%8A%A8%E6%9C%BA)\n  - [特性](#%E7%89%B9%E6%80%A7)\n  - [安装](#%E5%AE%89%E8%A3%85)\n  - [示例](#%E7%A4%BA%E4%BE%8B)\n  - [迁移](#%E8%BF%81%E7%A7%BB)\n  - [License](#license)\n\n## 重要提示\n以 \u003cfont color=#0e59d8\u003e750px\u003c/font\u003e 设计稿为基准.\n\n## 动机\nstyled-px2vw 主要为解决移动设备上多种屏幕尺寸的适配问题，移动设备的尺寸各不相同，目前流行的解决方案是使用 vw 单位，但是目前 styled-components 不支持这个功能，所以我们开发了 styled-px2vw 组件来解决适配问题，当然，这可能还存在很多问题，希望开发人员一起来优化 styled-px2vw，共同创造更好的前端生态系统。\n\n## 特性\n- 适用于移动端\n- 支持 [props 属性](https://www.styled-components.com/docs/basics#adapting-based-on-props)\n- 支持 [继承样式](https://www.styled-components.com/docs/basics#extending-styles)\n- 支持 [.attrs 构造](https://www.styled-components.com/docs/api#attrs)\n\n## 安装\nyarn:\n```\nyarn add styled-px2vw\n```\nnpm:\n```\nnpm i --save styled-px2vw\n```\n\n## 示例\n![style](/docs/images/style.png)\n\nOutput\n\n![converted](/docs/images/converted.png)\n\nScreenshot\n\n![screenshot](/docs/screenshot/screenshot.png)\n\n## 迁移\n只需要修改 styled-components -\u003e styled-px2vw 的导入即可\n\n```javascript\nimport styled, { createGlobalStyle,... } from 'styled-components';\n\nconst Button = styled.button`\n  color: white;\n  font-size: 36px;\n  margin: 10px;\n  height: 85px;\n  border: 2px solid palevioletred;\n  border-radius: 3px;\n`;\n```\nto\n```javascript\nimport styled, { createGlobalStyle,... } from 'styled-px2vw';\n\nconst Button = styled.button`\n  color: white;\n  font-size: 36px;\n  margin: 10px;\n  height: 85px;\n  border: 2px solid palevioletred;\n  border-radius: 3px;\n`;\n```\n\n## License\n\nLicensed under the MIT License, Copyright © 2018-present hnzycfc.com, https://www.hnzycfc.com/\n\nSee [LICENSE](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnzycfcfed%2Fstyled-px2vw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnzycfcfed%2Fstyled-px2vw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnzycfcfed%2Fstyled-px2vw/lists"}