0.0
No commit activity in last 3 years
No release in over 3 years
css_convertor flips the layout of your CSS file. You can use it if you're designing a website that supports both LTR and RTL languages: css_convertor will create a seperate CSS file of the new layout.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

CssConvertor

Flips the layout of your CSS file. You can use it if you're designing a website that supports both LTR and RTL languages: CssConvertor will create a seperate CSS file of the new layout. It was originally based on https://github.com/ded/R2

Explained

CssConvertor reads your CSS file, and when it finds something like this:

p {
  margin-right: 2px;
  padding: 1px 2px 3px 4px;
  left: 5px;
}
#container {
  float:right;
  text-align: right;
}

It will change it to:

p {
  margin-left: 2px;
  padding: 1px 4px 3px 2px;
  right: 5px;
}
#container {
  float:left;
  text-align: left;
}

Installation

Add this line to your application's Gemfile:

gem "css_convertor"

And then execute:

$ bundle

Or install it yourself as:

$ gem install css_convertor

Usage

$ css_convertor file.css

And if you didn't have this, add it to your CSS file

body {
  direction: rtl;
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request