vendor/assets/stylesheets/furatto/_grid.scss in furatto-1.2.6 vs vendor/assets/stylesheets/furatto/_grid.scss in furatto-1.2.7
- old
+ new
@@ -7,10 +7,11 @@
//@variables
//
//Grid settings
$number-of-columns: 12 !default;
+$offset-columns: $number-of-columns !default;
$column-separation-factor: 0.1833 !default;
//Row config
$row-text-rendering: optimizespeed !default;
$row-next-to-row-separation: 0.14285714rem !default;
@@ -51,10 +52,24 @@
width: percentage(($column-width * $i) / 100);
}
}
}
+//
+//@mixin
+//
+@mixin grid-columns-offset($columns: $offset-columns) {
+ $column-width: 100 / $columns;
+
+ @for $i from 1 through $columns {
+ .offset-#{$i} {
+ margin-left: percentage(($column-width * $i) / 100);
+ }
+ }
+
+}
+
.row {
@extend %clearfix;
display: block;
text-rendering: $row-text-rendering;
@@ -78,10 +93,11 @@
background: $grid-success-background-color;
}
//Columns
@include grid-columns;
+ @include grid-columns-offset;
}
//Separation between rows
.row + .row {
margin-top: $row-next-to-row-separation;
@@ -116,10 +132,26 @@
}
[class*="col-"] {
padding-left: 0;
}
+
+ &.nopaddingleft {
+ padding-left: 0;
+ }
+
+ &.nopaddingtop {
+ padding-top: 0;
+ }
+
+ &.nopaddingright {
+ padding-right: 0;
+ }
+
+ &.nopaddingbottom {
+ padding-bottom: 0;
+ }
}
@include max-screen($grid-max-width) {
[class*="col-"] {
&.border {
@@ -139,7 +171,11 @@
width: 100%;
margin-left: 0;
margin-bottom: $stack-column-separation;
padding-right: $stack-column-padding-right;
padding-left: $stack-column-padding-left;
+ }
+
+ [class*="offset-"] {
+ margin-left: 0;
}
}