{"id":21871732,"url":"https://github.com/ericmorand/rtl-sass","last_synced_at":"2026-03-03T10:33:34.044Z","repository":{"id":71882204,"uuid":"74952393","full_name":"ericmorand/rtl-sass","owner":"ericmorand","description":"Right-to-left done right with Sass","archived":false,"fork":false,"pushed_at":"2024-02-12T09:29:04.000Z","size":82,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T15:57:36.609Z","etag":null,"topics":["mixins","right-to-left","rtl","rtl-sass","sass"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/ericmorand.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-28T08:26:21.000Z","updated_at":"2025-07-03T10:15:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"16b4c89b-be5b-4f91-903a-657fad7c3e6c","html_url":"https://github.com/ericmorand/rtl-sass","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/ericmorand/rtl-sass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Frtl-sass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Frtl-sass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Frtl-sass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Frtl-sass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericmorand","download_url":"https://codeload.github.com/ericmorand/rtl-sass/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericmorand%2Frtl-sass/sbom","scorecard":{"id":380595,"data":{"date":"2025-08-11","repo":{"name":"github.com/ericmorand/rtl-sass","commit":"2579a7477feec26179c0aca08aa07ebbc9c465a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/24 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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 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-18T15:21:04.398Z","repository_id":71882204,"created_at":"2025-08-18T15:21:04.398Z","updated_at":"2025-08-18T15:21:04.398Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30041288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T10:28:37.494Z","status":"ssl_error","status_checked_at":"2026-03-03T10:28:28.686Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["mixins","right-to-left","rtl","rtl-sass","sass"],"created_at":"2024-11-28T06:15:06.480Z","updated_at":"2026-03-03T10:33:34.001Z","avatar_url":"https://github.com/ericmorand.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Right-to-Left [![NPM version][npm-image]][npm-url]\n\n**Right-to-left done right with Sass**\n\nRight-to-left makes supporting right-to-left languages in Sass super simple. Use the provided mixins instead of their belonging CSS declarations and you're done!\n\n## Provided mixins\n\n### Alignment\n\n* `text-align($value)`\n\n### Border\n\n* `border-bottom-left-radius($value)`\n* `border-bottom-right-radius($value)`\n* `border-color($top, $right: null, $bottom: null, $left: null)`\n* `border-left($value)`\n* `border-left-color($value)`\n* `border-left-style($value)`\n* `border-left-width($value)`\n* `border-radius($topLeft, $topRight: null, $bottomRight: null, $bottomLeft: null)`\n* `border-right($value)`\n* `border-right-color($value)`\n* `border-right-style($value)`\n* `border-right-width($value)`\n* `border-style($top, $right: null, $bottom: null, $left: null)`\n* `border-top-left-radius($value)`\n* `border-top-right-radius($value)`\n* `border-width($top, $right: null, $bottom: null, $left: null)`\n\n### Margin\n\n* `margin($top, $right: null, $bottom: null, $left: null)`\n* `margin-left($value)`\n* `margin-right($value)`\n\n### Padding\n\n* `padding($top, $right: null, $bottom: null, $left: null)`\n* `padding-left($value)`\n* `padding-right($value)`\n\n### Positioning\n\n* `float($value)`\n* `left($value)` \n* `right($value)`\n\n### API\n\n### Functions\n\nRight-to-left uses the following low-level functions to implement its right-to-left support.\n\n* `extract-1-to-4-values($one, $two: null, $three: null, $four: null)`\n\n  Returns a [Sass List](http://sass-lang.com/documentation/Sass/Script/Value/List.html) containing four values conforming to CSS specifications regarding the number of arguments of 1-to-4 declarations: if it is passed four values, they are returned as-it; if `$four` is missing, it is the same as `$two`; if `$three` is missing, it is the same as `$one`; if `$two` is missing, it is the same as `$one`.\n\n### Mixins\n\nRight-to-left uses the following low-level mixins to implement its right-to-left support. Feel free to use them to provide right-to-left support to declarations that are not (yet ^^) supported by rtl-sass.\n      \n* `declaration($property, $leftToRightValue, $rightToLeftValue)`\n\n   The lowest-level API mixin, called by all other mixins of the rtl-sass API. Provides right-to-left support by explicitly passing *ltr* and *rtl* values.\n   \n   To mimic the hypothetical CSS declaration...\n    \n   ```\n   [dir=\"ltr\"] .dummy {\n       dummy-property: left-to-right-value;\n   }\n   \n   [dir=\"rtl\"] .dummy {\n       dummy-property: right-to-left-value;\n   }\n   ```\n   \n   ...this mixin would be called with the following form:\n   \n   `@include declaration(dummy-property, left-to-right-value, right-to-left-value);`\n      \n* `declaration-1-to-4($property, $top, $right: null, $bottom: null, $left: null)`\n\n   Used to provide right-to-left support for *side-related* declarations using 1-to-4 value syntax - for example `margin: 20px 10px`. This mixin conforms to CSS specifications regarding the number of arguments: if it is passed four values, they set top, right, bottom and left in that order; if `$left` is missing, it is the same as `$right`; if `$bottom` is missing, it is the same as `$top`; if `$right` is missing, it is the same as `$top`.\n   \n   `$property` can be either a [Sass String](http://sass-lang.com/documentation/Sass/Script/Value/String.html) or a [Sass List](http://sass-lang.com/documentation/Sass/Script/Value/List.html). In the latter case, the first element of the list is considered as the property prefix and the second one (if any) as the property suffix. Any additional element of the list is ignored.\n  \n   To add right-to-left support for the hypothetical CSS declaration `dummy: 20px 10px 5px 0px`, this mixin would be called with one of the following forms:\n   \n   `@include declaration-1-to-4(dummy, 20px, 10px, 5px, 0px);`\n   \n   `@include declaration-1-to-4((dummy), 20px, 10px, 5px, 0px);`\n   \n   ...and would compile into:\n   \n   ```\n   .test {\n       dummy-top: 20px;\n       dummy-bottom: 5px;\n   }\n   \n   [dir=ltr] .test {\n       dummy-right: 10px;\n       dummy-left: 0;\n   }\n   \n   [dir=rtl] .test {\n       dummy-right: 0;\n       dummy-left: 10px;\n   }   \n   ```\n   \n   To add right-to-left support for the hypothetical CSS declaration `dummy-width: 20px 10px 5px 0px`, this mixin would be called with the following form...\n      \n   `@include declaration-1-to-4((dummy, width), 20px, 10px, 5px, 0px);`\n   \n   ...and would compile into:\n   \n   ```\n   .test {\n       dummy-top-width: 20px;\n       dummy-bottom-width: 5px;\n   }\n   \n   [dir=ltr] .test {\n       dummy-right-width: 10px;\n       dummy-left-width: 0;\n   }\n   \n   [dir=rtl] .test {\n       dummy-right-width: 0;\n       dummy-left-width: 10px;\n   }\n   ```\n \n* `declaration-1-to-4-corner($property, $topLeft, $topRight: null, $bottomRight: null, $bottomLeft: null)`\n\n   Used to provide right-to-left support for *corner-related* declarations using 1-to-4 value syntax - for example `radius: 20px 10px`. This mixin conforms to CSS specifications regarding the number of arguments: if it is passed four values, they set top-left, top-right, bottom-right and bottom-left in that order; if `$bottomLeft` is omitted it is the same as `$topRight`; if `$bottomRight` is omitted it is the same as `$topLeft`; if `$topRight` is omitted it is the same as `$topLeft`.\n   \n   `$property` can be either a [Sass String](http://sass-lang.com/documentation/Sass/Script/Value/String.html) or a [Sass List](http://sass-lang.com/documentation/Sass/Script/Value/List.html). In the latter case, the first element of the list is considered as the property prefix and the second one (if any) as the property suffix. Any additional element of the list is ignored.\n  \n   To add right-to-left support for the hypothetical CSS declaration `dummy: 20px 10px 5px 0px`, this mixin would be called with one of the following forms:\n   \n   `@include declaration-1-to-4-corner(dummy, 20px, 10px, 5px, 0px);`\n   \n   `@include declaration-1-to-4-corner((dummy), 20px, 10px, 5px, 0px);`\n   \n   ...and would compile into:\n   \n   ```\n   [dir=ltr] .test {\n       dummy-top-left: 20px;\n       dummy-top-right: 10px;\n       dummy-bottom-right: 5px;\n       dummy-bottom-left: 0;\n   }\n      \n   [dir=rtl] .test {\n       dummy-top-left: 10px;\n       dummy-top-right: 20px;\n       dummy-bottom-right: 0;\n       dummy-bottom-left: 5px;\n   }\n   ```\n   \n   To add right-to-left support for the hypothetical CSS declaration `dummy-radius: 20px 10px 5px 0px`, this mixin would be called with the following form...\n      \n   `@include declaration-1-to-4-corner((dummy, radius), 20px, 10px, 5px, 0px);`\n   \n   ...and would compile into:\n   \n   ```\n   [dir=ltr] .test {\n       dummy-top-left-radius: 20px;\n       dummy-top-right-radius: 10px;\n       dummy-bottom-right-radius: 5px;\n       dummy-bottom-left-radius: 0;\n   }\n   \n   [dir=rtl] .test {\n       dummy-top-left-radius: 10px;\n       dummy-top-right-radius: 20px;\n       dummy-bottom-right-radius: 0;\n       dummy-bottom-left-radius: 5px;\n   }\n   ```\n\n* `declaration-value($property, $value)`\n\n   Used to provide right-to-left support for declarations where the position *is* the value of the property - for example `text-align: left`.\n   \n   To add right-to-left support for the hypothetical CSS declaration `dummy: left`, this mixin would be called with the following form:\n   \n   `@include declaration-value(dummy, left);`\n\n## How to use\n\nFirst, install rtl-sass:\n\n```shell\nnpm i rtl-sass\n```\n\nThen _use_ the module:\n \n```scss\n@use \"{relative/path/to/node_modules}/rtl-sass\" as Rtl;\n\n.foo {\n  Rtl.border-color(orangered);\n}\n```\n\nYou can also _use_ each module independently:\n\n```scss\n@use \"{relative/path/to/node_modules}/rtl-sass/api\" as Api;\n@use \"{relative/path/to/node_modules}/rtl-sass/border\" as Border;\n\n.foo {\n  @include Api.declaration(float, left, right);\n  @include Border.border-color(black);\n}\n```\n\n## Contributing\n\n* Fork the main repository\n* Code\n* Implement tests using [node-tap](https://github.com/tapjs/node-tap)\n* Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue\n\n## License\n\nApache-2.0 © [Eric MORAND](eric.morand@gmail.com)\n\n[npm-image]: https://badge.fury.io/js/rtl-sass.svg\n[npm-url]: https://npmjs.org/package/rtl-sass","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Frtl-sass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericmorand%2Frtl-sass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericmorand%2Frtl-sass/lists"}