Permalink
Browse files

updated omega to works as nth-omega

  • Loading branch information...
Duke
Duke committed Nov 11, 2012
1 parent 2c01b93 commit 9914275e89d688293f122d4a321862b0d297d47c
Showing with 13 additions and 7 deletions.
  1. +13 −7 app/assets/stylesheets/grid/_grid.scss
@@ -89,13 +89,19 @@ $fg-max-width: $max-width;
}
// Remove element gutter
-@mixin omega($display: block, $direction: right) {
- @if $display == table {
- padding-#{$direction}: 0;
- }
-
- @else {
- margin-#{$direction}: 0;
+@mixin omega($display_or_nth: block, $direction_or_display: right, $direction: right) {
+ @if $display_or_nth == table {
+ padding-#{$direction_or_display}: 0;
+ } @else if $display_or_nth == block {
+ margin-#{$direction_or_display}: 0;
+ } @else {
+ &:nth-child(#{$display_or_nth}) {
+ @if $direction_or_display == table {
+ padding-#{$direction}: 0;
+ } @else {
+ margin-#{$direction}: 0;
+ }
+ }
}
}

0 comments on commit 9914275

Please sign in to comment.