Return to Snippet

Revision: 69141
at April 24, 2015 02:08 by merianos


Initial Code
/**
*   The following code is responsible to product text
*   align classes for different screen sizes.
------------------------------------------------------------------*/
$screens : 768, 970, 1024;
$sizes : sm, md, lg;
$aligns : left, right, center, justify;
$count : 0;

@each $screen in $screens {
    $count : $count + 1;
    @media (min-width: #{$screen}px)
    {
        $size : nth($sizes, $count);

        @each $align in $aligns {
            .text-#{$size}-#{$align} {
                text-align : #{$align} !important;
            }
        }
    }
}

Initial URL
https://github.com/merianos/bootstrap-all-screen-align

Initial Description
This is a simple SASS script that producing CSS classes for text alignment in different screen sizes primarily for bootstrap but of course can be used in other scripts as well.

Initial Title
Bootstrap All Screen Align

Initial Tags
css

Initial Language
SASS