_text.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // stylelint-disable declaration-no-important
  2. //
  3. // Text
  4. //
  5. .text-monospace { font-family: $font-family-monospace !important; }
  6. // Alignment
  7. .text-justify { text-align: justify !important; }
  8. .text-wrap { white-space: normal !important; }
  9. .text-nowrap { white-space: nowrap !important; }
  10. .text-truncate { @include text-truncate(); }
  11. // Responsive alignment
  12. @each $breakpoint in map-keys($grid-breakpoints) {
  13. @include media-breakpoint-up($breakpoint) {
  14. $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
  15. .text#{$infix}-left { text-align: left !important; }
  16. .text#{$infix}-right { text-align: right !important; }
  17. .text#{$infix}-center { text-align: center !important; }
  18. }
  19. }
  20. // Transformation
  21. .text-lowercase { text-transform: lowercase !important; }
  22. .text-uppercase { text-transform: uppercase !important; }
  23. .text-capitalize { text-transform: capitalize !important; }
  24. // Weight and italics
  25. .font-weight-light { font-weight: $font-weight-light !important; }
  26. .font-weight-lighter { font-weight: $font-weight-lighter !important; }
  27. .font-weight-normal { font-weight: $font-weight-normal !important; }
  28. .font-weight-bold { font-weight: $font-weight-bold !important; }
  29. .font-weight-bolder { font-weight: $font-weight-bolder !important; }
  30. .font-italic { font-style: italic !important; }
  31. // Contextual colors
  32. .text-white { color: $white !important; }
  33. @each $color, $value in $theme-colors {
  34. @include text-emphasis-variant(".text-#{$color}", $value, true);
  35. }
  36. .text-body { color: $body-color !important; }
  37. .text-muted { color: $text-muted !important; }
  38. .text-black-50 { color: rgba($black, .5) !important; }
  39. .text-white-50 { color: rgba($white, .5) !important; }
  40. // Misc
  41. .text-hide {
  42. @include text-hide($ignore-warning: true);
  43. }
  44. .text-decoration-none { text-decoration: none !important; }
  45. .text-break {
  46. word-break: break-word !important; // Deprecated, but avoids issues with flex containers
  47. word-wrap: break-word !important; // Used instead of `overflow-wrap` for IE & Edge Legacy
  48. }
  49. // Reset
  50. .text-reset { color: inherit !important; }