Skip to content

Conversation

twhitbeck
Copy link
Contributor

IE11 uses old word-wrap property instead of overflow-wrap. This adjusts the output of the wordBreak plugin.

@@ -1,12 +1,14 @@
export default function() {
return function({ addUtilities, variants }) {
return function({ addUtilities, variants, target }) {
const wrapPropertyName = target('wordBreak') === 'ie11' ? 'word-wrap' : 'overflow-wrap'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this using overflow-wrap when not targeting ie11 since that's the official name of the property now. Technically it would be fine to just use word-wrap instead of overflow-wrap if I'm reading https://css-tricks.com/almanac/properties/o/overflow-wrap/#the-historical-word-wrap-property right. Do ya'll think I made the right call here?

@adamwathan adamwathan merged commit d64b859 into tailwindlabs:master Oct 12, 2020
@adamwathan
Copy link
Member

This looks good, thanks!

@adamwathan
Copy link
Member

(Also I can't believe this was never reported until now? These utilities have just been broken for people who needed to support IE11 for 3 years?)

@twhitbeck twhitbeck deleted the wordbreak-ie11 branch October 12, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants