Created
April 10, 2015 15:28
-
-
Save scossar/48210d6720236144f86b 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.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
//$direction: ltr; | |
//$default-float: left; | |
//$opposite-float: right; | |
$direction: rtl; | |
$default-float: right; | |
$opposite-float: left; | |
// replaces padding: | |
@mixin padding($padding) { | |
@if length($padding) < 4 { | |
padding: $padding; | |
} @else if length($padding) == 4 { | |
@if $default-float == left { | |
padding: $padding; | |
} @else { | |
padding: nth($padding, 1) nth($padding, 4) nth($padding, 3) nth($padding, 2); | |
} | |
} @else { | |
// Deal with the possibility of 4 arguments plus !important | |
} | |
} | |
.box-1 { | |
@include padding(2px 8px 9px 23px); | |
} | |
// Change direction | |
$direction: rtl; | |
$default-float: left; | |
$opposite-float: right; | |
.box-2 { | |
@include padding(2px 8px 9px 23px); | |
} | |
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
.box-1 { | |
padding: 2px 23px 9px 8px; | |
} | |
.box-2 { | |
padding: 2px 8px 9px 23px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment