{"id":17103355,"url":"https://github.com/farwayer/react-native-tstyles","last_synced_at":"2026-05-04T02:39:46.250Z","repository":{"id":57341060,"uuid":"172580939","full_name":"farwayer/react-native-tstyles","owner":"farwayer","description":"Tachyons-like styles for React Native","archived":false,"fork":false,"pushed_at":"2020-11-02T11:47:18.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T16:07:27.463Z","etag":null,"topics":["react-native","styles","stylesheet","styling","tachyons"],"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/farwayer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-25T20:38:44.000Z","updated_at":"2020-11-02T11:47:11.000Z","dependencies_parsed_at":"2022-09-08T01:50:32.030Z","dependency_job_id":null,"html_url":"https://github.com/farwayer/react-native-tstyles","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/farwayer/react-native-tstyles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farwayer%2Freact-native-tstyles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farwayer%2Freact-native-tstyles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farwayer%2Freact-native-tstyles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farwayer%2Freact-native-tstyles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farwayer","download_url":"https://codeload.github.com/farwayer/react-native-tstyles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farwayer%2Freact-native-tstyles/sbom","scorecard":{"id":393129,"data":{"date":"2025-08-11","repo":{"name":"github.com/farwayer/react-native-tstyles","commit":"28cb627667376711a4abc17e6d9cb7b59e84dfb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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-18T18:19:33.160Z","repository_id":57341060,"created_at":"2025-08-18T18:19:33.160Z","updated_at":"2025-08-18T18:19:33.160Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["react-native","styles","stylesheet","styling","tachyons"],"created_at":"2024-10-14T15:33:09.187Z","updated_at":"2026-05-04T02:39:46.235Z","avatar_url":"https://github.com/farwayer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Tachyons Styles\n\n_Tachyons-like styles for React Native_\n\n[![NPM version](https://img.shields.io/npm/v/react-native-tstyles.svg)](https://www.npmjs.com/package/react-native-tstyles)\n\n\n## Configuration\n\nThere are two possible options: using default styles or init with a custom\nconfig.\n\n### Default styles\n\n```js\n/* View styles: {\n  marginHorizontal: 16,\n  flex: 1,\n  flexDirection: 'row',\n  justifyContent: 'flex-end',\n} */\n\nimport s from 'react-native-tstyles'\n\nfunction MyView() {\n  return (\n    \u003cView style={s`mh16 f1 row jcfe`}\u003e\n      ...\n    \u003c/View\u003e\n  )  \n}\n```\n\n### Init with custom config\n\n#### ui/styles.js\n\n```js\nimport {createStyles} from 'react-native-tstyles'\n\nexport default createStyles({\n  dimensions: [14], // extra, default in dimensions.js\n  fontSizes: [56],  // extra, default 0-48\n  indexes: [14],    // for zIndex and elevation; extra, default 0-10\n  colors: {\n    White: '#ffffff',\n    Purple: '#6963d6',\n    Yellow: '#FFFF00',\n  },\n  styles: { // custom extra styles\n    paper: {\n      elevation: 1,\n      shadowOffset: {\n        width: 1,\n        height: 1,\n      },\n      shadowRadius: 1,\n      shadowOpacity: 0.2,\n      borderRadius: 2,\n      backgroundColor: 'white', \n    },\n  },\n})\n```\n\n#### paper-with-text.js\n\n```js\n/* View styles: {\n  marginHorizontal: 14,\n  flex: 1,\n  alignItems: 'center',\n  elevation: 1,\n  shadowOffset: {\n    width: 1,\n    height: 1,\n  },\n  shadowRadius: 1,\n  shadowOpacity: 0.2,\n  borderRadius: 2,\n  backgroundColor: 'white',\n} */\n  \n/* Text styles: {\n  fontSize: 56,\n  color: '#6963d6',\n} */\n\nimport s from 'ui/styles'\n\nexport default function PaperWithText({text, warn}) {\n  return (\n     \u003cView style={s`mh14 f1 aic paper`}\u003e\n       \u003cText style={s(`fs56`, warn ? `yellow` : `purple`)}\u003e\n         {text}\n       \u003c/Text\u003e\n     \u003c/View\u003e\n  )\n}\n```\n\n## Preventing extra rendering memo'ized and Pure- components\n\n`s` take care result `style` property do not change if source styles are the same.\nStyles checked by the reference not by the value. So prevent using new js\nobjects each render time like `s('row', {height: 160})`. If you need custom\nstyle than you should create it once and use as function argument\n`s('row', heightStyle)`.\n\n## cn() helper: classname for ReactNative\n\nYou can use `cn()` helper for conditional styles. \n\n```js\ns.cn(\n  [flag1, onStyles1, offStyles1],\n  [flag2, onStyles2, offStyles2],\n  ...\n)\n```\n\n```js\nimport s from 'react-native-tstyles'\n\nfunction SelectableText({\n  enabled,\n  selected,\n  ...props\n}) {\n  const textStyle = s.cn(\n    [enabled, 'fs16', 'fs14'], // if enabled than s.fs16 else s.fs14\n    [selected, 'ttu b'],  // if selected than s.ttu and s.b\n  )\n\n  return (\n    \u003cText {...props} style={textStyle}/\u003e\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarwayer%2Freact-native-tstyles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarwayer%2Freact-native-tstyles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarwayer%2Freact-native-tstyles/lists"}