Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated omega to works as nth-omega

  • Loading branch information...
commit 9914275e89d688293f122d4a321862b0d297d47c 1 parent 2c01b93
@dukex authored
Showing with 13 additions and 7 deletions.
  1. +13 −7 app/assets/stylesheets/grid/_grid.scss
View
20 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;
+ }
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.