Last active
August 29, 2015 14:27
-
-
Save kidGodzilla/ef2bc5e33507e10ed920 to your computer and use it in GitHub Desktop.
Simple, declarative responsive text classes
This file contains hidden or 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
/* Responsive text */ | |
.text-left { text-align: left; } | |
.text-right { text-align: right; } | |
.text-center { text-align: center; } | |
.text-justify { text-align: justify; } | |
@media (max-width: 768px) { | |
.text-left-xs { text-align: left; } | |
.text-right-xs { text-align: right; } | |
.text-center-xs { text-align: center; } | |
.text-justify-xs { text-align: justify; } | |
} | |
@media (min-width: 768px) and (max-width: 992px) { | |
.text-left-sm { text-align: left; } | |
.text-right-sm { text-align: right; } | |
.text-center-sm { text-align: center; } | |
.text-justify-sm { text-align: justify; } | |
} | |
@media (min-width: 992px) and (max-width: 1200px) { | |
.text-left-md { text-align: left; } | |
.text-right-md { text-align: right; } | |
.text-center-md { text-align: center; } | |
.text-justify-md { text-align: justify; } | |
} | |
@media (min-width: 1200px) { | |
.text-left-lg { text-align: left; } | |
.text-right-lg { text-align: right; } | |
.text-center-lg { text-align: center; } | |
.text-justify-lg { text-align: justify; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses Bootstrap (3) syntax & breakpoints. The first five lines are redundant if you're adding this after bootstrap.css.