{"id":30764758,"url":"https://github.com/airbnb/react-with-styles-interface-css","last_synced_at":"2025-09-04T17:13:34.049Z","repository":{"id":49171770,"uuid":"91846964","full_name":"airbnb/react-with-styles-interface-css","owner":"airbnb","description":":page_with_curl: CSS interface for react-with-styles","archived":false,"fork":false,"pushed_at":"2023-03-04T02:00:14.000Z","size":127,"stargazers_count":32,"open_issues_count":3,"forks_count":11,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-08-24T19:00:11.065Z","etag":null,"topics":["css","react","react-with-styles"],"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/airbnb.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,"governance":null}},"created_at":"2017-05-19T21:32:16.000Z","updated_at":"2024-09-16T08:03:14.000Z","dependencies_parsed_at":"2022-07-30T22:07:58.533Z","dependency_job_id":"9ef177fd-cda9-4273-a98d-06f189cd9f67","html_url":"https://github.com/airbnb/react-with-styles-interface-css","commit_stats":{"total_commits":115,"total_committers":7,"mean_commits":"16.428571428571427","dds":0.6260869565217391,"last_synced_commit":"d876f97c2ecded483266b25248578ea439a0f818"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/airbnb/react-with-styles-interface-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Freact-with-styles-interface-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Freact-with-styles-interface-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Freact-with-styles-interface-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Freact-with-styles-interface-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airbnb","download_url":"https://codeload.github.com/airbnb/react-with-styles-interface-css/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2Freact-with-styles-interface-css/sbom","scorecard":{"id":173417,"data":{"date":"2025-08-11","repo":{"name":"github.com/airbnb/react-with-styles-interface-css","commit":"d876f97c2ecded483266b25248578ea439a0f818"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"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":"Code-Review","score":3,"reason":"Found 7/22 approved changesets -- score normalized to 3","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":"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":"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":"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":"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":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":-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":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/airbnb/.github/SECURITY.md:1","Info: Found linked content: github.com/airbnb/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/airbnb/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 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-16T17:08:10.775Z","repository_id":49171770,"created_at":"2025-08-16T17:08:10.775Z","updated_at":"2025-08-16T17:08:10.775Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273641912,"owners_count":25142254,"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-09-04T02:00:08.968Z","response_time":61,"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","react","react-with-styles"],"created_at":"2025-09-04T17:13:31.756Z","updated_at":"2025-09-04T17:13:34.027Z","avatar_url":"https://github.com/airbnb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-with-styles-interface-css\n\nInterface for [react-with-styles](https://www.npmjs.com/package/react-with-styles) that compiles CSS-in-js styles to static CSS classes with deterministic and human-friendly class names whose styles can be easily overridden.\n\n## Usage\n\n### Interface\n\nA [react-with-styles](https://www.npmjs.com/package/react-with-styles) interface which is to be used along with [react-with-styles](https://www.npmjs.com/package/react-with-styles).\n\n```javascript\nimport ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet';\nimport CSSInterface, { registerCSSInterfaceNamespace } from 'react-with-styles-interface-css';\n\nThemedStyleSheet.registerInterface(CSSInterface);\n\n// Optional: Prefix all class names in the output with 'MyPackageName__'\nconst namespace = 'MyPackageName';\nregisterCSSInterfaceNamespace(namespace);\n```\n\n### Styles\nWhen writing styles, all classes throughout a project should be given unique names. Otherwise, class name collisions may result in unexpected and unwanted behavior.\n\n### Overriding styles\nThe styles for a class can be overridden using the same name with which the class was defined. If the optional class name prefix was configured, the prefix should be used when overriding a class.\n\n**Note:** In order to provide compatibility with [aphrodite](https://github.com/airbnb/react-with-styles-interface-aphrodite), the CSS output by this interface uses specifiers with varying levels of specificity. This allows for style resolution to be sensitive to the ordering of styles in calls to `css(...)`. However, these extra specifiers should not be overridden.\n\n### Compile\n\nThe styles passed to `withStyles` in the source code are compiled to static CSS by the `compileCSS` function shown below. For convenience, a CLI wrapping `compileCSS` is provided.\n\n#### Compile via CLI\n\nCompile styles to CSS using the `compile-css` CLI.\n- Expects a relative or absolute path to the entry point source file of a React application\n- Automatically compiles the source file and its imported dependencies on the fly using the babel configuration present in the project if one exists\n- Outputs a `stylesheet.css` file containing the compiled CSS in the current working directory\n\n##### Run the CLI via npm script (preferred):\n\n```json\n{\n  \"scripts\": {\n    \"build:css\": \"compile-css src/App.jsx\"\n  }\n}\n```\n```\nnpm run build:css\n```\n\n##### Run the CLI directly:\n\n```sh\n./node_modules/.bin/compile-css src/App.jsx\n```\n\n#### Compile via library function\n\n```javascript\nimport compileCSS from 'react-with-styles-interface-css/compile';\n\nconst entryPointFilePath = 'src/App.jsx';\n// CSS is the minified CSS output\nconst CSS = compileCSS(entryPointFilePath);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2Freact-with-styles-interface-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairbnb%2Freact-with-styles-interface-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2Freact-with-styles-interface-css/lists"}