Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use word-wrap instead of overflow-wrap when targeting ie11 #2391

Merged
merged 1 commit into from
Oct 12, 2020

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
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