Created
February 20, 2014 11:04
-
-
Save Tonours/9111271 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ========================================================================== | |
| // Helpers | |
| // ========================================================================== | |
| // Switch ON/OFF | |
| // ========================================================================== | |
| $reset-margin: true; | |
| $margin: true; | |
| $reset-padding: true; | |
| $padding: true; | |
| $float: true; | |
| $alignement: true; | |
| // Margin | |
| // ========================================================================== | |
| $orientations: top, right, bottom, left; | |
| $dimensions: 5, 10, 15, 20, 60; | |
| @if $reset-margin == true { | |
| @each $orientation in $orientations { | |
| .reset-margin-#{$orientation}{ | |
| margin-#{$orientation}: 0; | |
| } | |
| } | |
| } | |
| @if $margin == true { | |
| @each $orientation in $orientations { | |
| @each $dimension in $dimensions { | |
| .margin-#{$orientation}-#{$dimension} { | |
| margin-#{$orientation}: #{$dimension}px; | |
| } | |
| } | |
| } | |
| } | |
| // Padding | |
| // ========================================================================== | |
| @if $reset-padding == true { | |
| @each $orientation in $orientations { | |
| .reset-padding-#{$orientation}{ | |
| padding-#{$orientation}: 0; | |
| } | |
| } | |
| } | |
| @if $padding == true { | |
| @each $orientation in $orientations { | |
| @each $dimension in $dimensions { | |
| .padding-#{$orientation}-#{$dimension} { | |
| padding-#{$orientation}: #{$dimension}px; | |
| } | |
| } | |
| } | |
| } | |
| // Alignements | |
| // ========================================================================== | |
| // Floated alignments | |
| $floateds: left, right, none; | |
| @if $float == true { | |
| @each $floated in $floateds { | |
| .float-#{$floated} { | |
| float: $floated; | |
| } | |
| } | |
| } | |
| // Text alignements | |
| $aligns: left, right, center; | |
| @if $alignement == true { | |
| @each $align in $aligns { | |
| .text-#{$align} { | |
| text-align: $aligns; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment