{"id":18707541,"url":"https://github.com/discourse/rtlcss","last_synced_at":"2025-07-10T16:37:47.770Z","repository":{"id":65681632,"uuid":"595884492","full_name":"discourse/rtlcss","owner":"discourse","description":"A wrapper around the rtlcss npm package to flip CSS direction in Ruby","archived":false,"fork":false,"pushed_at":"2024-12-15T21:55:16.000Z","size":146,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-05T19:17:25.460Z","etag":null,"topics":["rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"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/discourse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-01T02:07:18.000Z","updated_at":"2024-12-15T21:55:19.000Z","dependencies_parsed_at":"2024-03-21T20:45:13.786Z","dependency_job_id":"9a4bf7d5-572a-458f-b994-3e741e317e00","html_url":"https://github.com/discourse/rtlcss","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"ce27061b67d2610c8de6f753fac81f3eeadf0e66"},"previous_names":["discourse/rtlcss_wrapper"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Frtlcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Frtlcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Frtlcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discourse%2Frtlcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discourse","download_url":"https://codeload.github.com/discourse/rtlcss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248551506,"owners_count":21123105,"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","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":["rubygem"],"created_at":"2024-11-07T12:18:49.109Z","updated_at":"2025-04-12T10:24:07.221Z","avatar_url":"https://github.com/discourse.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rtlcss\n\nA wrapper gem for the `rtlcss` [npm package](https://www.npmjs.com/package/rtlcss) to flip CSS direction in ruby. For example, given the following CSS that's designed to work with LTR (Left To Right) layouts:\n\n```css\na {\n  left: 5px;\n  padding-right: 5px;\n  margin: 1px 2px 3px 4px;\n}\n```\n\nYou can use this gem to produce the following CSS which is suitable for RTL (Right To Left) layouts:\n\n```css\na {\n  right: 5px;\n  padding-left: 5px;\n  margin: 1px 4px 3px 2px;\n}\n```\n\nThis gem uses [`mini_racer`](https://github.com/rubyjs/mini_racer) to call the `rtlcss` npm package.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add rtlcss\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install rtlcss\n\n## Usage\n\n```ruby\nrequire \"rtlcss\"\n\nRtlcss.flip_css(\"a { right: 1px; }\") # =\u003e \"a { left: 1px; }\"\n```\n\nSyntactically-broken CSS will raise a `Rtlcss::FlipError` exception.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, update the `CHANGELOG.md` file, and commit the changes and push to GitHub. Our GitHub Action will then take care of pushing the new versio to rubygems.org.\n\nInstructions for updating the distributed copy of `rtlcss` that's included with this gem (i.e. the `dist/main.js` file) can be found in the README in the `rtlcss-miniracer` directory.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/discourse/rtlcss. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/discourse/rtlcss/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Rtlcss project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/discourse/rtlcss/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscourse%2Frtlcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscourse%2Frtlcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscourse%2Frtlcss/lists"}