Permalink
Browse files

Set up version v0.0.3 with moz and webkit support

  • Loading branch information...
1 parent cd19877 commit 274c8aca59eb54754477f01a122fd22e0cc7b6ff @mzsanford committed Jun 23, 2011
Showing with 28 additions and 6 deletions.
  1. +14 −5 README.md
  2. +13 −0 lib/r2.rb
  3. +1 −1 lib/r2/version.rb
View
@@ -1,23 +1,32 @@
-== R2
+## R2
Library for swapping CSS values for right-to-left display. A direct Ruby port of the Javascript/Node project at https://github.com/ded/R2.
-== Installation ==
+## Installation
$ gem install r2
-== Usage ==
+## Usage
You can use the handy static method for flipping any CSS string via:
> R2.r2("/* Comment */\nbody { direction: rtl; }")
#=> "body{direction:ltr;}"
-== Reporting bugs ==
+## Reporting bugs
Report bugs in the github project at http://github.com/mzsanford/r2rb
-== Copyright and License ==
+## Change Log
+
+ * v0.0.3 - Feature release
+ * [FEATURE] Added -moz and -webkit border support
+ * [FEATURE] Added box-shadow (+moz and webkit) support
+ * [DOC] Added change log
+ * v0.0.2 - Documentation updated
+ * v0.0.1 - Initial release
+
+## Copyright and License
Copyright 2011 Twitter, Inc.
View
@@ -29,8 +29,18 @@ class Swapper
'border-radius-bottomleft' => 'border-radius-bottomright',
'border-radius-bottomright' => 'border-radius-bottomleft',
+ 'border-radius-topleft' => 'border-radius-topright',
+ 'border-radius-topright' => 'border-radius-topleft',
+
'-moz-border-radius-bottomright' => '-moz-border-radius-bottomleft',
'-moz-border-radius-bottomleft' => '-moz-border-radius-bottomright',
+ '-moz-border-radius-topright' => '-moz-border-radius-topleft',
+ '-moz-border-radius-topleft' => '-moz-border-radius-topright',
+
+ '-webkit-border-top-right-radius' => '-webkit-border-top-left-radius',
+ '-webkit-border-top-left-radius' => '-webkit-border-top-right-radius',
+ '-webkit-border-bottom-right-radius' => '-webkit-border-bottom-left-radius',
+ '-webkit-border-bottom-left-radius' => '-webkit-border-bottom-right-radius',
'left' => 'right',
'right' => 'left'
@@ -41,6 +51,9 @@ class Swapper
'margin' => lambda {|obj,val| obj.quad_swap(val) },
'text-align' => lambda {|obj,val| obj.side_swap(val) },
'float' => lambda {|obj,val| obj.side_swap(val) },
+ 'box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
+ '-webkit-box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
+ '-moz-box-shadow' => lambda {|obj,val| obj.quad_swap(val) },
'direction' => lambda {|obj,val| obj.direction_swap(val) }
}
View
@@ -1,3 +1,3 @@
module R2
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end

0 comments on commit 274c8ac

Please sign in to comment.