export default function() {
  return function({ addUtilities, variants, target }) {
    const wrapPropertyName = target('wordBreak') === 'ie11' ? 'word-wrap' : 'overflow-wrap'

    addUtilities(
      {
        '.break-normal': {
          [wrapPropertyName]: 'normal',
          'word-break': 'normal',
        },
        '.break-words': { [wrapPropertyName]: 'break-word' },
        '.break-all': { 'word-break': 'break-all' },

        '.truncate': {
          overflow: 'hidden',
          'text-overflow': 'ellipsis',
          'white-space': 'nowrap',
        },
      },
      variants('wordBreak')
    )
  }
}

export default function() {
  return function({ addUtilities, variants }) {
    addUtilities(
      {
        '.break-normal': {
          // For IE 11, remove 'word-wrap' when we have a 'modern' mode
          'word-wrap': 'normal',
          'overflow-wrap': 'normal',
          'word-break': 'normal',
        },
        '.break-words': {
          // For IE 11, remove 'word-wrap' when we have a 'modern' mode
          'word-wrap': 'break-word',
          'overflow-wrap': 'break-word',
        },
        '.break-all': { 'word-break': 'break-all' },

        '.truncate': {
          overflow: 'hidden',
          'text-overflow': 'ellipsis',
          'white-space': 'nowrap',
        },
      },
      variants('wordBreak')
    )
  }
}

Use word-wrap and overflow-wrap since word-wrap is not supported in Chrome et al
Use word-wrap and overflow-wrap since word-wrap is not supported in Chrome et al
