Permalink
Browse files

Remove table display from omega

  • Loading branch information...
1 parent 536ccff commit 7eeeec3edfc8a050a6094bc76dbfd20698166b00 Reda Lemeden committed Feb 7, 2014
Showing with 10 additions and 69 deletions.
  1. +10 −28 app/assets/stylesheets/grid/_omega.scss
  2. +0 −24 spec/neat/omega_spec.rb
  3. +0 −17 test/omega.scss
@@ -9,21 +9,19 @@
$direction: get-direction($layout-direction, $default-layout-direction);
}
+ @if $table {
+ @warn "The omega mixin no longer removes padding in table layouts."
+ }
+
@if length($query) == 1 {
@if $auto {
&:last-child {
margin-#{$direction}: 0;
}
}
- @else if contains-display-value($query) {
- @if $table {
- padding-#{$direction}: 0;
- }
-
- @else {
- margin-#{$direction}: 0;
- }
+ @else if contains-display-value($query) and $table == false {
+ margin-#{$direction}: 0;
}
@else {
@@ -32,30 +30,14 @@
}
@else if length($query) == 2 {
- @if $table {
- @if $auto {
- &:last-child {
- padding-#{$direction}: 0;
- }
- }
-
- @else {
- &:nth-child(#{nth($query, 1)}) {
- padding-#{$direction}: 0;
- }
+ @if $auto {
+ &:last-child {
+ margin-#{$direction}: 0;
}
}
@else {
- @if $auto {
- &:last-child {
- margin-#{$direction}: 0;
- }
- }
-
- @else {
- @include nth-child(nth($query, 1), $direction);
- }
+ @include nth-child(nth($query, 1), $direction);
}
}
@@ -11,12 +11,6 @@
end
end
- context "with argument (table)" do
- it "removes right padding" do
- expect('.omega-table').to have_rule('padding-right: 0')
- end
- end
-
context "with argument (4n)" do
it "removes right margin of nth-child(4n)" do
expect('.omega-nth-default:nth-child(4n)').to have_rule('margin-right: 0')
@@ -27,12 +21,6 @@
end
end
- context "with argument (4n table)" do
- it "removes right padding of nth-child(4n)" do
- expect('.omega-nth-table:nth-child(4n)').to have_rule('padding-right: 0')
- end
- end
-
context "with argument ('4n+1')" do
it "removes right margin of nth-child(4n+1)" do
expect('.omega-complex-nth:nth-child(4n+1)').to have_rule('margin-right: 0')
@@ -46,22 +34,10 @@
end
end
- context "with argument (table)" do
- it "removes left padding" do
- expect('section .omega-table-left').to have_rule('padding-left: 0')
- end
- end
-
context "with argument (4n block)" do
it "removes left margin of nth-child(4n)" do
expect('section .omega-nth-default-left:nth-child(4n)').to have_rule('margin-left: 0')
end
end
-
- context "with argument (4n table)" do
- it "removes left padding of nth-child(4n)" do
- expect('section .omega-nth-table-left:nth-child(4n)').to have_rule('padding-left: 0')
- end
- end
end
end
View
@@ -4,18 +4,10 @@
@include omega;
}
-.omega-table {
- @include omega(table);
-}
-
.omega-nth-default {
@include omega(4n)
}
-.omega-nth-table {
- @include omega(4n table);
-}
-
.omega-complex-nth {
@include omega("4n+1");
}
@@ -27,16 +19,7 @@ section {
@include omega;
}
- .omega-table-left{
- @include omega(table);
- }
-
.omega-nth-default-left {
@include omega(4n block);
}
-
- .omega-nth-table-left {
- @include omega(4n table);
- @include reset-layout-direction;
- }
}

0 comments on commit 7eeeec3

Please sign in to comment.