Skip to content

Instantly share code, notes, and snippets.

@merianos
Created December 6, 2015 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merianos/5de551e23f27ee31d1b0 to your computer and use it in GitHub Desktop.
Save merianos/5de551e23f27ee31d1b0 to your computer and use it in GitHub Desktop.
Sass implementation of text align per column
$screens : $container-sm, $container-md, $container-lg;
$sizes : sm, md, lg;
$aligns : left, right, center, justify;
$count : 0;
@each $screen in $screens {
$count : $count + 1;
@media ( min-width: #{$screen} ) {
$size : nth($sizes, $count);
@each $align in $aligns {
.text-#{$size}-#{$align} {
text-align : #{$align} !important;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment