/ Published in: SASS
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * 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; } } } }
URL: https://github.com/merianos/bootstrap-all-screen-align