/**
 * Word breaking
 *
 * Break strings when their length exceeds the width of their container.
 */

.u-text-break {
  word-wrap: break-word !important;
}

/**
 * Inherit the ancestor's text color.
 */

.u-text-inherit-color {
  color: inherit !important;
}

/**
 * Enables font kerning in all browsers.
 * http://blog.typekit.com/2014/02/05/kerning-on-the-web/
 *
 * 1. Chrome (not Windows), Firefox, IE 10+
 * 2. Safari 7 and future browsers
 * 3. Chrome (not Windows), Firefox, Safari 6+, iOS, Android
 */

.u-text-kern {
  font-feature-settings: "kern" 1; /* 1 */
  font-kerning: normal; /* 2 */
  text-rendering: optimizeLegibility; /* 3 */
}

/**
 * Prevent whitespace wrapping
 */
.u-text-no-wrap {
  white-space: nowrap !important;
}

/**
 * Text truncation
 *
 * Prevent text from wrapping onto multiple lines, and truncate with an
 * ellipsis.
 *
 * 1. Ensure that the node has a maximum width after which truncation can
 *    occur.
 * 2. Fix for IE 8/9 if `word-wrap: break-word` is in effect on ancestor
 *    nodes.
 */

.u-text-truncate {
  max-width: 100% !important; /* 1 */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  word-wrap: normal !important; /* 2 */
}

/**
 * Horizontal text alignment
 */
.u-text-justify {
  text-align: justify !important;
}

.u-text-nowrap {
  white-space: nowrap !important;
}

.u-text-align-left {
  text-align: left !important;
}

.u-text-align-center {
  text-align: center !important;
}

.u-text-align-right {
  text-align: right !important;
}

/**
 * Text transformation
 */
.u-text-lowercase {
  text-transform: lowercase !important;
}

.u-text-uppercase {
  text-transform: uppercase !important;
}

.u-text-capitalize {
  text-transform: capitalize !important;
}

.u-text-strike {
  text-decoration: line-through !important;
}

/**
 * Text weights & italics
 */
.u-font-weight-normal {
  font-weight: normal !important;
}

.u-font-weight-bold {
  font-weight: bold !important;
}

.u-font-italic {
  font-style: italic !important;
}
