Last active
August 29, 2015 14:23
-
-
Save johndjameson/b6837d9f5e6bd0ee4558 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.14) | |
// Compass (v1.0.3) | |
// ---- | |
=respond-to($val, $query: min-width, $media: screen) | |
@media #{$media} and ($query: $val) | |
@content | |
$b-breakpoints: (s: 400px, m: 800px, l: 1200px) | |
$b-space: 1.25em | |
$b-space-xs: $b-space / 4 | |
$b-space-s: $b-space / 2 | |
$b-space-l: $b-space * 2 | |
$b-space-xl: $b-space * 4 | |
$b-space-map: (xs: $b-space-xs, s: $b-space-s, m: $b-space, l: $b-space-l, xl: $b-space-xl) | |
$tool-padding-options: b (xs s m l xl), s (m l), m (l xl), l (xl) | |
@each $item in $tool-padding-options | |
$breakpoint: nth($item, 1) | |
$sizes: nth($item, 2) | |
@if $breakpoint == 'b' | |
@each $size in $sizes | |
.pa#{$size} | |
padding: map-get($b-space-map, $size) | |
@else | |
+respond-to(map-get($b-breakpoints, $breakpoint)) | |
@each $size in $sizes | |
.pa#{$size}--#{$breakpoint} | |
padding: map-get($b-space-map, $size) |
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
.paxs { | |
padding: 0.3125em; | |
} | |
.pas { | |
padding: 0.625em; | |
} | |
.pam { | |
padding: 1.25em; | |
} | |
.pal { | |
padding: 2.5em; | |
} | |
.paxl { | |
padding: 5em; | |
} | |
@media screen and (min-width: 400px) { | |
.pam--s { | |
padding: 1.25em; | |
} | |
.pal--s { | |
padding: 2.5em; | |
} | |
} | |
@media screen and (min-width: 800px) { | |
.pal--m { | |
padding: 2.5em; | |
} | |
.paxl--m { | |
padding: 5em; | |
} | |
} | |
@media screen and (min-width: 1200px) { | |
.paxl--l { | |
padding: 5em; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment