Mirror::Mirror

Performs right-to-left flipping of sass stylesheets using an opt-out strategy. That is, when enabled, all directional properties in CSS are flipped so that the page is as it would be if viewed in a mirror (with the exception of the text characters and images)

Installation

Add this line to your application's Gemfile:

gem 'mirror-mirror', :require => 'mirror-mirror/activate'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mirror-mirror

Usage

Because this library patches itself into Sass the normal require of 'mirror-mirror' simply loads all the ruby code but does not perform any patching. It is expected that ruby libraries will activate the library by calling MirrorMirror.activate! if they want the patching to occur.

However, two special ruby files are available to require instead for the common use cases:

Make the MirrorMirror mixins available for import:

scss -r mirror-mirror/activate ...

Make flipping happen by default to all files compiled:

scss -r mirror-mirror/activate/flipped ...

Contributing

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