-
-
Save zearadoua/a4c1d4a6ac6a0930d5be80e4a75cb046 to your computer and use it in GitHub Desktop.
bootstrap mixin for rtl
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
@mixin rtl() { | |
html[dir=rtl] & { | |
@content; | |
} | |
} | |
// float element right in rtl | |
@mixin float-columns-right($class, $i: 1, $list: ".col-#{$class}-#{$i}") { | |
@for $i from (1 + 1) through $grid-columns { | |
$list: "#{$list}, .col-#{$class}-#{$i}"; | |
} | |
#{$list} { | |
@include rtl(){ | |
float: right; | |
} | |
} | |
} | |
@include float-columns-right(xs); | |
@media (min-width: $screen-sm-min) { | |
@include float-columns-right(sm); | |
} | |
@media (min-width: $screen-md-min) { | |
@include float-columns-right(md); | |
} | |
@media (min-width: $screen-lg-min) { | |
@include float-columns-right(lg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment