Skip to content

Instantly share code, notes, and snippets.

@shaimoom
Created April 28, 2016 16:30
Show Gist options
  • Save shaimoom/eeb2ed0ccecad8e3cb814a1229c7e3fa to your computer and use it in GitHub Desktop.
Save shaimoom/eeb2ed0ccecad8e3cb814a1229c7e3fa to your computer and use it in GitHub Desktop.
ZURB Foundation for Emails responsive spacers using a SASS list
// add classname spacer$i to <spacer> tag in your HTML (e.g. <spacer size="20" class="spacer20")
// choose numbers for $spacer based on what size spacer you need
$spacer: 10, 20, 30, 40, 50;
@each $i in $spacer {
.spacer#{$i} td{
@media (max-width: 596px) {
font-size: ($i/2+px) !important; // reduces spacer in half on mobile screens, customize as needed
line-height: ($i/2+px) !important; // reduces spacer in half on mobile screens, customize as needed
height: ($i/2+px) !important; // reduces spacer in half on mobile screens, customize as needed
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment