{"id":16410712,"url":"https://github.com/justim/postcss-svg-fallback","last_synced_at":"2025-10-04T08:45:41.239Z","repository":{"id":31591381,"uuid":"35156195","full_name":"justim/postcss-svg-fallback","owner":"justim","description":"An automatic SVG converter for your CSS files","archived":false,"fork":false,"pushed_at":"2019-02-22T17:41:54.000Z","size":30,"stargazers_count":39,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T17:14:36.264Z","etag":null,"topics":["javascript","postcss","postcss-plugins","svg","svg-fallback"],"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/justim.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":"2015-05-06T12:08:28.000Z","updated_at":"2024-10-18T07:49:27.000Z","dependencies_parsed_at":"2022-09-21T02:31:12.277Z","dependency_job_id":null,"html_url":"https://github.com/justim/postcss-svg-fallback","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/justim/postcss-svg-fallback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justim%2Fpostcss-svg-fallback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justim%2Fpostcss-svg-fallback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justim%2Fpostcss-svg-fallback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justim%2Fpostcss-svg-fallback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justim","download_url":"https://codeload.github.com/justim/postcss-svg-fallback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justim%2Fpostcss-svg-fallback/sbom","scorecard":{"id":543767,"data":{"date":"2025-08-11","repo":{"name":"github.com/justim/postcss-svg-fallback","commit":"ccc324e053ea0884bf40f64f456da2a08f61d6a7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"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":"Code-Review","score":1,"reason":"Found 3/28 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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 5 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-20T08:53:42.947Z","repository_id":31591381,"created_at":"2025-08-20T08:53:42.947Z","updated_at":"2025-08-20T08:53:42.947Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278289475,"owners_count":25962353,"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-10-04T02:00:05.491Z","response_time":63,"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":["javascript","postcss","postcss-plugins","svg","svg-fallback"],"created_at":"2024-10-11T06:43:41.691Z","updated_at":"2025-10-04T08:45:41.221Z","avatar_url":"https://github.com/justim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svg-fallback [![Build Status](https://secure.travis-ci.org/justim/postcss-svg-fallback.png)](https://travis-ci.org/justim/postcss-svg-fallback)\n\n\u003e An automatic SVG converter for your CSS files, built on top of the [PostCSS] ecosystem.\n\n## Usage\n\nRight now it is only possible to use this as a [PostCSS] plugin:\n\n```js\nvar postcss = require('postcss')\nvar svgFallback = require('postcss-svg-fallback')\n\nvar input = read(/* read some css */);\npostcss()\n\t.use(svgFallback({\n\t\t// base path for the images found in the css\n\t\t// this is most likely the path to the css file you're processing\n\t\t// not setting this option might lead to unexpected behavior\n\t\tbasePath: '',\n\n\t\t// destination for the generated SVGs\n\t\t// this is most likely the path to where the generated css file is outputted\n\t\t// not setting this option might lead to unexpected behavior\n\t\tdest: '',\n\n\t\t// selector that gets prefixed to selector\n\t\tfallbackSelector: '.no-svg',\n\n\t\t// when `true` only the css is changed (no new files created)\n\t\tdisableConvert: false,\n\t})\n\t.process(input)\n\t.then(function(processor) {\n\t\tvar output = processor.toString();\n\t});\n```\n\n\u003e Note: we must use the async version of postcss\n\nConverts this:\n\n```css\n.icon {\n\tbackground: url(images/sun-is-shining.svg) no-repeat;\n\tbackground-size: 20px 20px; /* background-size is mandatory */\n}\n\n.icon-inline {\n\tbackground: url(data:image/svg+xml; .. svg data ..) no-repeat;\n\tbackground-size: 20px 20px; /* background-size is mandatory */\n}\n```\n\nto this:\n\n```css\n.icon {\n\t/* original declarations are untouched */\n\tbackground: url(images/sun-is-shining.svg) no-repeat;\n\tbackground-size: 20px 20px;\n}\n\n/* same selector, but with a prefix */\n.no-svg .icon {\n\t/* a png image is generated and placed in the `dest` folder,\n\t * with default settings, that's right next to the original SVG\n\t */\n\tbackground-image: url(images/sun-is-shining-20x20.png);\n}\n\n.icon-inline {\n\tbackground: url(data:image/svg+xml; .. svg data ..) no-repeat;\n\tbackground-size: 20px 20px; /* background-size is mandatory */\n}\n\n.no-svg .icon-inline {\n\t/* filename contains the hash of the svg data */\n\tbackground-image: url(3547c094eaf671040650cdcab2ca70fd-20x20.png);\n}\n```\n\nConverting is done with [PhantomJS] and is only done for images that actually need conversion (`background-size` \u0026 `mtime`).\n\n[PostCSS]: https://github.com/postcss/postcss\n[PhantomJS]: http://phantomjs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustim%2Fpostcss-svg-fallback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustim%2Fpostcss-svg-fallback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustim%2Fpostcss-svg-fallback/lists"}