Created
January 12, 2016 20:12
-
-
Save daphotron/9b8ccb737225ef392742 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.20) | |
// Compass (v1.0.3) | |
// ---- | |
$color-border-soft: #ccc; | |
// padding and margin | |
// padding and margin | |
$orientation_list: ( | |
v, | |
h, | |
a | |
); | |
$direction_list: ( | |
(t, top), | |
(r, right), | |
(b, bottom), | |
(l, left) | |
); | |
$space_sizes: | |
(l, 2em), //large | |
(m, 1.5em), //medium | |
(n, 1em), //normal | |
(s, 0.5em), //small | |
(xs, 0.25em) //x-small | |
; | |
@each $direction_list, $direction in $direction_list { | |
@each $space_sizes, $size in $space_sizes { | |
.p#{$direction_list}#{$space_sizes} { | |
padding-#{$direction}: $size; | |
} | |
.m#{$direction_list}#{$space_sizes} { | |
margin-#{$direction}: $size; | |
} | |
} | |
} | |
@each $orientation_list, $orientation in $orientation_list { | |
@each $space_sizes, $size in $space_sizes { | |
@if $orientation_list == "v" { | |
.p#{$orientation_list}#{$space_sizes} { | |
padding-bottom: $size; | |
padding-top: $size; | |
} | |
.m#{$orientation_list}#{$space_sizes} { | |
margin-bottom: $size; | |
margin-top: $size; | |
} | |
} | |
@else if $orientation_list == "h" { | |
.p#{$orientation_list}#{$space_sizes} { | |
padding-left: $size; | |
padding-right: $size; | |
} | |
.m#{$orientation_list}#{$space_sizes} { | |
margin-left: $size; | |
margin-right: $size; | |
} | |
} | |
@else { | |
.p#{$orientation_list}#{$space_sizes} { | |
padding: $size; | |
} | |
.m#{$orientation_list}#{$space_sizes} { | |
margin: $size; | |
} | |
} | |
} | |
} | |
// border | |
$border_sizes: | |
(l, 5px), //large | |
(m, 2px), //medium | |
(n, 1px) //normal | |
; | |
@each $direction_list, $direction in $direction_list { | |
@each $border_sizes, $width in $border_sizes { | |
@if $border_sizes != "" { | |
.b#{$direction_list}#{$border_sizes} { | |
border-#{$direction}: $width solid $color-border-soft; | |
} | |
} | |
@else { | |
.b#{$direction_list} { | |
border-#{$direction}: $width solid $color-border-soft; | |
} | |
} | |
} | |
} | |
@each $orientation_list, $orientation in $orientation_list { | |
@each $border_sizes, $size in $border_sizes { | |
$hyphen: ''; | |
@if $space_sizes != ''{ | |
$hyphen: '-'; | |
} | |
@if $orientation_list == "v" { | |
.b#{$orientation_list}#{$border_sizes} { | |
border-bottom: $size; | |
border-top: $size; | |
} | |
} | |
@else if $orientation_list == "h" { | |
.b#{$orientation_list}#{$border_sizes} { | |
border-left: $size; | |
border-right: $size; | |
} | |
} | |
@else { | |
.b#{$orientation_list}#{$border_sizes} { | |
border: $size solid $color-border-soft; | |
} | |
} | |
} | |
} |
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
.ptl { | |
padding-top: 2em; | |
} | |
.mtl { | |
margin-top: 2em; | |
} | |
.ptm { | |
padding-top: 1.5em; | |
} | |
.mtm { | |
margin-top: 1.5em; | |
} | |
.ptn { | |
padding-top: 1em; | |
} | |
.mtn { | |
margin-top: 1em; | |
} | |
.pts { | |
padding-top: 0.5em; | |
} | |
.mts { | |
margin-top: 0.5em; | |
} | |
.ptxs { | |
padding-top: 0.25em; | |
} | |
.mtxs { | |
margin-top: 0.25em; | |
} | |
.prl { | |
padding-right: 2em; | |
} | |
.mrl { | |
margin-right: 2em; | |
} | |
.prm { | |
padding-right: 1.5em; | |
} | |
.mrm { | |
margin-right: 1.5em; | |
} | |
.prn { | |
padding-right: 1em; | |
} | |
.mrn { | |
margin-right: 1em; | |
} | |
.prs { | |
padding-right: 0.5em; | |
} | |
.mrs { | |
margin-right: 0.5em; | |
} | |
.prxs { | |
padding-right: 0.25em; | |
} | |
.mrxs { | |
margin-right: 0.25em; | |
} | |
.pbl { | |
padding-bottom: 2em; | |
} | |
.mbl { | |
margin-bottom: 2em; | |
} | |
.pbm { | |
padding-bottom: 1.5em; | |
} | |
.mbm { | |
margin-bottom: 1.5em; | |
} | |
.pbn { | |
padding-bottom: 1em; | |
} | |
.mbn { | |
margin-bottom: 1em; | |
} | |
.pbs { | |
padding-bottom: 0.5em; | |
} | |
.mbs { | |
margin-bottom: 0.5em; | |
} | |
.pbxs { | |
padding-bottom: 0.25em; | |
} | |
.mbxs { | |
margin-bottom: 0.25em; | |
} | |
.pll { | |
padding-left: 2em; | |
} | |
.mll { | |
margin-left: 2em; | |
} | |
.plm { | |
padding-left: 1.5em; | |
} | |
.mlm { | |
margin-left: 1.5em; | |
} | |
.pln { | |
padding-left: 1em; | |
} | |
.mln { | |
margin-left: 1em; | |
} | |
.pls { | |
padding-left: 0.5em; | |
} | |
.mls { | |
margin-left: 0.5em; | |
} | |
.plxs { | |
padding-left: 0.25em; | |
} | |
.mlxs { | |
margin-left: 0.25em; | |
} | |
.pvl { | |
padding-bottom: 2em; | |
padding-top: 2em; | |
} | |
.mvl { | |
margin-bottom: 2em; | |
margin-top: 2em; | |
} | |
.pvm { | |
padding-bottom: 1.5em; | |
padding-top: 1.5em; | |
} | |
.mvm { | |
margin-bottom: 1.5em; | |
margin-top: 1.5em; | |
} | |
.pvn { | |
padding-bottom: 1em; | |
padding-top: 1em; | |
} | |
.mvn { | |
margin-bottom: 1em; | |
margin-top: 1em; | |
} | |
.pvs { | |
padding-bottom: 0.5em; | |
padding-top: 0.5em; | |
} | |
.mvs { | |
margin-bottom: 0.5em; | |
margin-top: 0.5em; | |
} | |
.pvxs { | |
padding-bottom: 0.25em; | |
padding-top: 0.25em; | |
} | |
.mvxs { | |
margin-bottom: 0.25em; | |
margin-top: 0.25em; | |
} | |
.phl { | |
padding-left: 2em; | |
padding-right: 2em; | |
} | |
.mhl { | |
margin-left: 2em; | |
margin-right: 2em; | |
} | |
.phm { | |
padding-left: 1.5em; | |
padding-right: 1.5em; | |
} | |
.mhm { | |
margin-left: 1.5em; | |
margin-right: 1.5em; | |
} | |
.phn { | |
padding-left: 1em; | |
padding-right: 1em; | |
} | |
.mhn { | |
margin-left: 1em; | |
margin-right: 1em; | |
} | |
.phs { | |
padding-left: 0.5em; | |
padding-right: 0.5em; | |
} | |
.mhs { | |
margin-left: 0.5em; | |
margin-right: 0.5em; | |
} | |
.phxs { | |
padding-left: 0.25em; | |
padding-right: 0.25em; | |
} | |
.mhxs { | |
margin-left: 0.25em; | |
margin-right: 0.25em; | |
} | |
.pal { | |
padding: 2em; | |
} | |
.mal { | |
margin: 2em; | |
} | |
.pam { | |
padding: 1.5em; | |
} | |
.mam { | |
margin: 1.5em; | |
} | |
.pan { | |
padding: 1em; | |
} | |
.man { | |
margin: 1em; | |
} | |
.pas { | |
padding: 0.5em; | |
} | |
.mas { | |
margin: 0.5em; | |
} | |
.paxs { | |
padding: 0.25em; | |
} | |
.maxs { | |
margin: 0.25em; | |
} | |
.btl { | |
border-top: 5px solid #ccc; | |
} | |
.btm { | |
border-top: 2px solid #ccc; | |
} | |
.btn { | |
border-top: 1px solid #ccc; | |
} | |
.brl { | |
border-right: 5px solid #ccc; | |
} | |
.brm { | |
border-right: 2px solid #ccc; | |
} | |
.brn { | |
border-right: 1px solid #ccc; | |
} | |
.bbl { | |
border-bottom: 5px solid #ccc; | |
} | |
.bbm { | |
border-bottom: 2px solid #ccc; | |
} | |
.bbn { | |
border-bottom: 1px solid #ccc; | |
} | |
.bll { | |
border-left: 5px solid #ccc; | |
} | |
.blm { | |
border-left: 2px solid #ccc; | |
} | |
.bln { | |
border-left: 1px solid #ccc; | |
} | |
.bvl { | |
border-bottom: 5px; | |
border-top: 5px; | |
} | |
.bvm { | |
border-bottom: 2px; | |
border-top: 2px; | |
} | |
.bvn { | |
border-bottom: 1px; | |
border-top: 1px; | |
} | |
.bhl { | |
border-left: 5px; | |
border-right: 5px; | |
} | |
.bhm { | |
border-left: 2px; | |
border-right: 2px; | |
} | |
.bhn { | |
border-left: 1px; | |
border-right: 1px; | |
} | |
.bal { | |
border: 5px solid #ccc; | |
} | |
.bam { | |
border: 2px solid #ccc; | |
} | |
.ban { | |
border: 1px solid #ccc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment