_text.less 2.4 KB

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