bootstrap-less-port
Version:
A Less port of Bootstrap v4
83 lines (60 loc) • 2.35 kB
text/less
//
// Text
//
.text-monospace { font-family: @font-family-monospace ; }
// Alignment
.text-justify { text-align: justify ; }
.text-wrap { white-space: normal ; }
.text-nowrap { white-space: nowrap ; }
.text-truncate { #text-truncate(); }
// Responsive alignment
//@each $breakpoint in map-keys($grid-breakpoints) {
// @include media-breakpoint-up($breakpoint) {
// $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
//
// .text#{$infix}-left { text-align: left !important; }
// .text#{$infix}-right { text-align: right !important; }
// .text#{$infix}-center { text-align: center !important; }
// }
//}
each(map-keys(@grid-breakpoints), #(@breakpoint) {
#media-breakpoint-up(@breakpoint, {
@infix: breakpoint-infix(@breakpoint, @grid-breakpoints);
.text@{infix}-left { text-align: left ; }
.text@{infix}-right { text-align: right ; }
.text@{infix}-center { text-align: center ; }
});
});
// Transformation
.text-lowercase { text-transform: lowercase ; }
.text-uppercase { text-transform: uppercase ; }
.text-capitalize { text-transform: capitalize ; }
// Weight and italics
.font-weight-light { font-weight: @font-weight-light ; }
.font-weight-lighter { font-weight: @font-weight-lighter ; }
.font-weight-normal { font-weight: @font-weight-normal ; }
.font-weight-bold { font-weight: @font-weight-bold ; }
.font-weight-bolder { font-weight: @font-weight-bolder ; }
.font-italic { font-style: italic ; }
// Contextual colors
.text-white { color: @white ; }
//@each $color, $value in $theme-colors {
// @include text-emphasis-variant(".text-#{$color}", $value);
//}
each(@theme-colors, #(@value, @color) {
#text-emphasis-variant(~".text-@{color}", @value, true);
});
.text-body { color: @body-color ; }
.text-muted { color: @text-muted ; }
.text-black-50 { color: fade(@black, 50%) ; }
.text-white-50 { color: fade(@white, 50%) ; }
// Misc
.text-hide {
#text-hide(@ignore-warning: true);
}
.text-decoration-none { text-decoration: none ; }
.text-break {
word-wrap: break-word ;
}
// Reset
.text-reset { color: inherit ; }