Sha256: caf163f006e357cdcb08094671b9e88ca86c5d58f2c9873794ce263cc2a10843
Contents?: true
Size: 1.68 KB
Versions: 1
Compression:
Stored size: 1.68 KB
Contents
// // Block Grid Variables // $include-html-grid-classes: $include-html-classes !default; // We use this to control the maximum number of block grid elements per row $block-grid-elements: 12 !default; $block-grid-default-spacing: 10px !default; // // Block Grid Mixins // // We use this mixin to create different block-grids. You can apply per-row and spacing options. // Setting $base-style to false will ommit default styles. @mixin block-grid($per-row:false, $spacing:$block-grid-default-spacing, $base-style:true) { @if $base-style { display: block; padding: 0; margin: 0 (-$spacing); @include clearfix; &>li { display: inline; height: auto; float: $default-float; padding: 0 $spacing $spacing; } } @if $per-row { &>li { width: 100%/$per-row; padding: 0 $spacing $spacing; &:nth-of-type(n) { clear: none; } &:nth-of-type(#{$per-row}n+1) { clear: both; } } } } @if $include-html-grid-classes { /* Abstractio Block Grids for below small breakpoint */ @media only screen { [class*="block-grid-"] { @include block-grid; } @for $i from 1 through $block-grid-elements { .small-block-grid-#{($i)} { @include block-grid($i,$block-grid-default-spacing,false); } } } /* Abstractio Block Grids for above small breakpoint */ @media #{$small} { /* Remove small grid clearing */ @for $i from 1 through $block-grid-elements { .small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; } } @for $i from 1 through $block-grid-elements { .large-block-grid-#{($i)} { @include block-grid($i,$block-grid-default-spacing,false); } } } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
themepile-abstractio-4.1.7 | scss/abstractio/components/_block-grid.scss |