Created
January 13, 2014 14:09
-
-
Save iilei/8400882 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
/** | |
* In order to have common ways to deal with webmailer-specific overrides, those | |
* "failsafe" mixins shall provide shorthands therfor. | |
*/ | |
$orientations: 'top', 'right', 'bottom', 'left'; | |
@mixin padding($values...) { | |
padding: $values; | |
// 2 arguments | |
// arg1: top & bottom, arg2 right & left | |
@if (length($values)==1) { | |
$values: join($values, nth($values, 1)); | |
} | |
@if (length($values)==2) { | |
$values: join($values, $values); | |
} | |
@if (length($values)==3) { | |
$values: join($values, nth($values, 2)); | |
} | |
@if $SuperSpecific { | |
@for $i from 1 through length($values) { | |
padding-#{nth($orientations, $i)}: #{nth($values, $i)}; | |
} | |
} | |
} | |
@mixin margin($values...) { | |
margin: $values; | |
// 2 arguments | |
// arg1: top & bottom, arg2 right & left | |
@if (length($values)==1) { | |
$values: join($values, nth($values, 1)); | |
} | |
@if (length($values)==2) { | |
$values: join($values, $values); | |
} | |
@if (length($values)==3) { | |
$values: join($values, nth($values, 2)); | |
} | |
@if $SuperSpecific { | |
@for $i from 1 through length($values) { | |
margin-#{nth($orientations, $i)}: #{nth($values, $i)}; | |
} | |
} | |
} |
This file contains 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
/** | |
* In order to have common ways to deal with webmailer-specific overrides, those | |
* "failsafe" mixins shall provide shorthands therfor. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment