Permalink
Browse files

Add support for backgrounds which are centred using 50% instead of ce…

…nter
  • Loading branch information...
1 parent 2132f24 commit 06e1ff7bae126d21c81e81101c5a5a879e7034bb @jamesl1001 committed Mar 7, 2013
Showing with 14 additions and 4 deletions.
  1. +5 −1 README.md
  2. +9 −3 sass/_rtl-sass.scss
View
6 README.md
@@ -1,7 +1,7 @@
RTL-Sass
========
-v0.0.5
+v0.0.6
http://jalproductions.co.uk/
@@ -32,6 +32,10 @@ Coming soon...
## Change log
+### 0.0.6
+
+- Add support for backgrounds which are centred using `50%` instead of `center`
+
### 0.0.5
- indent properties and align values
View
12 sass/_rtl-sass.scss
@@ -20,6 +20,8 @@ $rtl: false !default;
background: nth($value, 1) nth($value, 2) nth($value, 3) left nth($value, 5);
} @else if nth($value, 4) == center {
background: nth($value, 1) nth($value, 2) nth($value, 3) center nth($value, 5);
+ } @else if nth($value, 4) == 50% {
+ background: nth($value, 1) nth($value, 2) nth($value, 3) 50% nth($value, 5);
} @else {
background: nth($value, 1) nth($value, 2) nth($value, 3) nth($value, 4) * -1 nth($value, 5);
}
@@ -30,6 +32,8 @@ $rtl: false !default;
background: nth($value, 1) nth($value, 2) left nth($value, 4);
} @else if nth($value, 3) == center {
background: nth($value, 1) nth($value, 2) center nth($value, 4);
+ } @else if nth($value, 3) == 50% {
+ background: nth($value, 1) nth($value, 2) 50% nth($value, 4);
} @else {
background: nth($value, 1) nth($value, 2) nth($value, 3) * -1 nth($value, 4);
}
@@ -52,6 +56,8 @@ $rtl: false !default;
background-position: left nth($value, 2);
} @else if nth($value, 1) == center {
background-position: center nth($value, 2);
+ } @else if nth($value, 1) == 50% {
+ background-position: 50% nth($value, 2);
} @else {
background-position: nth($value, 1) * -1 nth($value, 2);
}
@@ -211,9 +217,9 @@ $rtl: false !default;
@include paddinglr($value, right);
}
-// ===========================
-// = Left/right positionning =
-// ===========================
+// ==========================
+// = Left/right positioning =
+// ==========================
@mixin position-h($value, $origin: left) {
@if $origin == left {
@if $rtl { right: $value; }

0 comments on commit 06e1ff7

Please sign in to comment.