Skip to content

Instantly share code, notes, and snippets.

@acodesmith
Created November 25, 2014 04:33
Show Gist options
  • Save acodesmith/d532d610913d12a0df0d to your computer and use it in GitHub Desktop.
Save acodesmith/d532d610913d12a0df0d to your computer and use it in GitHub Desktop.
Twitter Bootstrap text align based on media break points
/**
Reference ONLY! Variables should be included elsewhere.
$small-lower:'767px';
$medium-lower:'991px';
$large-lower:'1199px';
**/
/**
Build Alignment Based on Breakpoints
**/
//RIGHT
.text-right-lg {
@media(max-width: $large-lower){
text-align:right;
}
}
.text-right-md {
@media(max-width: $medium-lower){
text-align:right;
}
}
.text-right-sm {
@media(max-width: $small-lower){
text-align:right;
}
}
//LEFT
.text-left-lg {
@media(max-width: $large-lower){
text-align:left;
}
}
.text-left-md {
@media(max-width: $medium-lower){
text-align:left;
}
}
.text-left-sm {
@media(max-width: $small-lower){
text-align:left;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment