Created
August 20, 2013 19:25
-
-
Save amboy00/6286007 to your computer and use it in GitHub Desktop.
responsive padding.
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
$total-padding: 8; | |
@media only screen { | |
@for $x from 0 through $total-padding { | |
@for $y from 0 through $total-padding { | |
.small-padding-#{$x}-#{$y} { | |
padding-top: $x * 1em; | |
padding-bottom: $y * 1em; | |
} | |
} | |
} | |
} | |
@media only screen and (min-width: 768px) { | |
@for $x from 0 through $total-padding { | |
@for $y from 0 through $total-padding { | |
.medium-padding-#{$x}-#{$y} { | |
padding-top: $x * 1em; | |
padding-bottom: $y * 1em; | |
} | |
} | |
} | |
} | |
@media only screen and (min-width: 900px) { | |
@for $x from 0 through $total-padding { | |
@for $y from 0 through $total-padding { | |
.large-padding-#{$x}-#{$y} { | |
padding-top: $x * 1em; | |
padding-bottom: $y * 1em; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment