scss/foundation/components/_grid.scss in zurb-foundation-4.0.7 vs scss/foundation/components/_grid.scss in zurb-foundation-4.0.8
- old
+ new
@@ -51,11 +51,11 @@
}
// For creating columns - @include these inside a media query to control small vs. large grid layouts
-@mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:false) {
+@mixin grid-column($columns:false, $last-column:false, $center:false, $offset:false, $push:false, $pull:false, $collapse:false, $float:left) {
position: relative;
// Gutter padding whenever a column isn't set to collapse
@if $collapse == false {
@@ -86,14 +86,15 @@
// If centered, get rid of float and add appropriate margins
@if $center {
margin-left: auto;
margin-right: auto;
+ float: none !important;
}
@if $float {
- @if $float == left { float: $default-float; }
+ @if $float == left or true { float: $default-float; }
@else if $float == right { float: $default-opposite; }
@else { float: none; }
}
}
@@ -119,49 +120,49 @@
}
@media only screen {
.row .column,
- .row .columns { @include grid-column($columns:false, $float:left); }
+ .row .columns { @include grid-column($columns:false); }
@for $i from 1 through $total-columns {
- .row .small#{-$i} { @include grid-column($columns:$i,$collapse:null); }
+ .row .small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
}
@for $i from 1 through $total-columns - 2 {
- .row .small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null); }
+ .row .small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
}
[class*="column"] + [class*="column"]:last-child { float: $default-opposite; }
[class*="column"] + [class*="column"].end { float: $default-float; }
.column.small-centered,
- .columns.small-centered { @include grid-column($center:true, $collapse:null, $float:none); }
+ .columns.small-centered { @include grid-column($center:true, $collapse:null, $float:false); }
}
/* Styles for screens that are atleast 768px; */
@media #{$small} {
@for $i from 1 through $total-columns {
- .row .large#{-$i} { @include grid-column($columns:$i,$collapse:null); }
+ .row .large#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
}
@for $i from 1 through $total-columns - 2 {
- .row .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null); }
+ .row .large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
}
@for $i from 2 through $total-columns - 2 {
- .push#{-$i} { @include grid-column($push:$i, $collapse:null); }
- .pull#{-$i} { @include grid-column($pull:$i, $collapse:null); }
+ .push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
+ .pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
}
@for $i from 2 through $total-columns - 2 {
.small-push#{-$i} { left: inherit; }
.small-pull#{-$i} { right: inherit; }
}
.column.large-centered,
- .columns.large-centered { @include grid-column($center:true, $collapse:null, $float:none); }
+ .columns.large-centered { @include grid-column($center:true, $collapse:null, $float:false); }
}
}
\ No newline at end of file