{"id":21420552,"url":"https://github.com/maxhoffmann/ocss-parser","last_synced_at":"2026-04-08T14:32:20.894Z","repository":{"id":20023070,"uuid":"23290940","full_name":"maxhoffmann/ocss-parser","owner":"maxhoffmann","description":":fax: syntax parser for the OCSS preprocessor","archived":false,"fork":false,"pushed_at":"2016-04-11T12:35:00.000Z","size":399,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T00:43:56.480Z","etag":null,"topics":["css","syntax-parser"],"latest_commit_sha":null,"homepage":"http://maxhoffmann.github.io/ocss-parser/","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/maxhoffmann.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":"2014-08-24T19:47:01.000Z","updated_at":"2016-04-11T12:12:24.000Z","dependencies_parsed_at":"2022-08-27T02:35:14.244Z","dependency_job_id":null,"html_url":"https://github.com/maxhoffmann/ocss-parser","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/maxhoffmann/ocss-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhoffmann%2Focss-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhoffmann%2Focss-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhoffmann%2Focss-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhoffmann%2Focss-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxhoffmann","download_url":"https://codeload.github.com/maxhoffmann/ocss-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxhoffmann%2Focss-parser/sbom","scorecard":{"id":629151,"data":{"date":"2025-08-11","repo":{"name":"github.com/maxhoffmann/ocss-parser","commit":"4f6926dd5af2bebf47c7337c0b774ffb3eb90bb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-21T07:20:51.385Z","repository_id":20023070,"created_at":"2025-08-21T07:20:51.385Z","updated_at":"2025-08-21T07:20:51.385Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31559791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["css","syntax-parser"],"created_at":"2024-11-22T20:18:11.128Z","updated_at":"2026-04-08T14:32:20.872Z","avatar_url":"https://github.com/maxhoffmann.png","language":"JavaScript","readme":"ocss-parser\n===========\n\n[![version][1]][2]\n[![build][3]][4]\n\nThis is the repository for the syntax parser and stringifier of the [OCSS preprocessor][5]. You can try it out in the [live editor][6].\n\nInput\n-----\n\n```\ndisplay: block\ncolor: red\n\nchild // comment\n  color: blue\n  background: transparent\n\n  :hover\n    color: red\n\n  subchild\n    font-size: 12px\n// another comment\n=big\n  font-size: 200%\n\n  child\n    color: red\n```\n\nAST Output\n----------\n\n```json\n{\n  \"type\": \"object\",\n  \"name\": \"test\",\n  \"declarations\": [\n    {\n      \"position\": {\n        \"line\": 1\n      },\n      \"type\": \"declaration\",\n      \"property\": \"display\",\n      \"value\": \"block\"\n    },\n    {\n      \"position\": {\n        \"line\": 2\n      },\n      \"type\": \"declaration\",\n      \"property\": \"color\",\n      \"value\": \"red\"\n    }\n  ],\n  \"elements\": [\n    {\n      \"position\": {\n        \"line\": 4\n      },\n      \"type\": \"element\",\n      \"name\": \"child\",\n      \"declarations\": [\n        {\n          \"position\": {\n            \"line\": 5\n          },\n          \"type\": \"declaration\",\n          \"property\": \"color\",\n          \"value\": \"blue\"\n        },\n        {\n          \"position\": {\n            \"line\": 6\n          },\n          \"type\": \"declaration\",\n          \"property\": \"background\",\n          \"value\": \"transparent\"\n        }\n      ],\n      \"pseudoelements\": [\n        {\n          \"position\": {\n            \"line\": 8\n          },\n          \"type\": \"pseudoelement\",\n          \"name\": \"hover\",\n          \"declarations\": [\n            {\n              \"position\": {\n                \"line\": 9\n              },\n              \"type\": \"declaration\",\n              \"property\": \"color\",\n              \"value\": \"red\"\n            }\n          ]\n        }\n      ],\n      \"elements\": [\n        {\n          \"position\": {\n            \"line\": 11\n          },\n          \"type\": \"element\",\n          \"name\": \"subchild\",\n          \"declarations\": [\n            {\n              \"position\": {\n                \"line\": 12\n              },\n              \"type\": \"declaration\",\n              \"property\": \"font-size\",\n              \"value\": \"12px\"\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"modifiers\": [\n    {\n      \"position\": {\n        \"line\": 14\n      },\n      \"type\": \"modifier\",\n      \"name\": \"big\",\n      \"declarations\": [\n        {\n          \"position\": {\n            \"line\": 15\n          },\n          \"type\": \"declaration\",\n          \"property\": \"font-size\",\n          \"value\": \"200%\"\n        }\n      ],\n      \"elements\": [\n        {\n          \"position\": {\n            \"line\": 17\n          },\n          \"type\": \"element\",\n          \"name\": \"child\",\n          \"declarations\": [\n            {\n              \"position\": {\n                \"line\": 18\n              },\n              \"type\": \"declaration\",\n              \"property\": \"color\",\n              \"value\": \"red\"\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}\n```\n\nCSS Output\n----------\n\n```css\n.test {\n  display: block;\n  color: red;\n}\n.test-child {\n  color: blue;\n  background: transparent;\n}\n.test-child-subchild {\n  font-size: 12px;\n}\n.test-child:hover {\n  color: red;\n}\n.test--big {\n  font-size: 200%;\n}\n.test--big .test-child {\n  color: red;\n}\n```\n\nTests\n-----\n\nInstall dependencies with `npm install` once. Afterwards run `npm test` every time you want to start the tests.\n\n[1]: http://img.shields.io/npm/v/ocss-parser.svg?style=flat\n[2]: https://www.npmjs.org/package/ocss-parser\n[3]: http://img.shields.io/travis/maxhoffmann/ocss-parser.svg?style=flat\n[4]: https://travis-ci.org/maxhoffmann/ocss-parser\n[5]: https://github.com/maxhoffmann/ocss\n[6]: http://maxhoffmann.github.io/ocss-parser/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhoffmann%2Focss-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxhoffmann%2Focss-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxhoffmann%2Focss-parser/lists"}