{"id":50358633,"url":"https://github.com/pomelott/postcss-retina-px-border","last_synced_at":"2026-05-30T00:01:26.911Z","repository":{"id":57328447,"uuid":"291700732","full_name":"pomelott/postcss-retina-px-border","owner":"pomelott","description":"PostCSS plugin which create real physical pixel border on retina screen.","archived":false,"fork":false,"pushed_at":"2020-09-10T09:42:15.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T13:44:19.071Z","etag":null,"topics":["1px","dpr","plugin","postcss","px","retina"],"latest_commit_sha":null,"homepage":"","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/pomelott.png","metadata":{"files":{"readme":"README.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":"2020-08-31T11:48:33.000Z","updated_at":"2021-02-25T02:05:32.000Z","dependencies_parsed_at":"2022-08-23T15:02:30.797Z","dependency_job_id":null,"html_url":"https://github.com/pomelott/postcss-retina-px-border","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pomelott/postcss-retina-px-border","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomelott%2Fpostcss-retina-px-border","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomelott%2Fpostcss-retina-px-border/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomelott%2Fpostcss-retina-px-border/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomelott%2Fpostcss-retina-px-border/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomelott","download_url":"https://codeload.github.com/pomelott/postcss-retina-px-border/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomelott%2Fpostcss-retina-px-border/sbom","scorecard":{"id":740656,"data":{"date":"2025-08-11","repo":{"name":"github.com/pomelott/postcss-retina-px-border","commit":"552f4b0fec7001bc8713223457e1827da9f015c8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T17:20:08.462Z","repository_id":57328447,"created_at":"2025-08-22T17:20:08.463Z","updated_at":"2025-08-22T17:20:08.463Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33675019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["1px","dpr","plugin","postcss","px","retina"],"created_at":"2026-05-30T00:01:26.181Z","updated_at":"2026-05-30T00:01:26.905Z","avatar_url":"https://github.com/pomelott.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-retina-px-border\n\nPostCSS plugin which create real physical pixel border dynamically on retina screen.\n\n* if like this, could you please ⭐️star⭐ on github\n\n## History versions\n\n* [v1.x](https://github.com/pomelott/postcss-retina-px-border/blob/master/v1.md)\n* [v2.x](https://github.com/pomelott/postcss-retina-px-border/blob/master/v2.md) ( use inlined div )\n* v3.x use pseudo element\n\n## Fast use\n\n### install\n\n```bash\n    npm install postcss postcss-retina-px-border -D\n```\n\nor\n\n```bash\n    yarn add postcss postcss-retina-px-border --dev\n```\n\n### Init\n\n* config in webpack（at root file postcss.config.js）\n\n```js\n    module.exports = {\n        plugins: [\n            require('postcss-retina-px-border')\n        ]\n    }\n```\n\n* import the file (the file will be generated at 'src/retina-border.scss), you can also change the filename in options.\n\n```js\n    // app.js\n    import './style/retina-border.scss';\n```\n\n### Use and development\n\n* the style generated have been transfer with autoprefixer, so just use it.\n* then you can use the output selector directly, the selector with dpr 3 as follows, and you can also config by your self.\n\n```css\n    .retina-border-box {\n        position: relative;\n        z-index: 1\n    }\n    @media screen and (-webkit-min-device-pixel-ratio: 3) {\n        .retina-border-1px:after {\n            content: '';\n            position: absolute;\n            top: 0;\n            left: 0;\n            z-index: -1;\n            width: 300%;\n            height: 300%;\n            border-width: 1px;\n            transform: scale(0.3333333333333333);\n            transform-origin: 0 0\n        }\n        .retina-border-2px:after {\n            content: '';\n            position: absolute;\n            top: 0;\n            left: 0;\n            z-index: -1;\n            width: 300%;\n            height: 300%;\n            border-width: 2px;\n            transform: scale(0.3333333333333333);\n            transform-origin: 0 0\n        }\n    }\n```\n\n* use in other files:\n\n\u0026nbsp;\nnotice: you should give a specific class selector of div such as '.text-box'. the example as follows:\n\n```html\n    \u003cdiv class=\"retina-border-box retina-border-1px text-box\"\u003e\n      \u003cdiv class=\"content-box\"\u003ebox-content\u003c/div\u003e\n    \u003c/div\u003e\n```\n\n```css\n  .text-box{\n    width: 50vw;\n    height: 40vw;\n  }\n  .text-box:after{\n    border-color: red;\n    border-style: solid;\n    border-radius: 30px;\n  }\n```\n\n## Options\n\n### example\n\n```js\n    module.exports = {\n        plugins: [\n            require('postcss-retina-px-border')({\n                pxRange: 5\n            })\n        ]\n    }\n```\n\n### option list\n\n| option | type | default | description |\n|:---:|:---:|:---:|:---:|\n| baseDir | string | rootDir-of-project/src | a relative/absolute path to generate file, and this will be joined with filename param. such as 'src/' |\n| filename | string | 'retina-border.scss' | the name of target file to generate style with, such as retina-border.scss、 retina-border.less |\n| pxRange | number | 2 | the range of borderWidth to generate |\n| dprRange | number | 3 | the range of dpr to generate |\n| selector | string | '.retina-border-%dpx' | the format of selector when generating |\n| baseSelector | string | '.retina-border-box' | the base-style selector |\n\n## Strategy\n\n* the new adaptation scheme of mobile h5 page based on viewport(vw/vh), so there is an problem that when we use small-px border, it become thicker than expected when rendered on retina screen.\n* so we enlarge pseudo element size according to dpr, and then reduce the element with scale function.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomelott%2Fpostcss-retina-px-border","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomelott%2Fpostcss-retina-px-border","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomelott%2Fpostcss-retina-px-border/lists"}