dobtco / dvl-core

Base styles for the DOBT View Layer.
https://design.dobt.co/
1 stars 1 forks source link

Add word-wrap: break-word to user-submitted content that spans multiple lines #186

Closed ajb closed 8 years ago

ajb commented 8 years ago

img

ajb commented 8 years ago

See https://github.com/dobtco/screendoor-v2/pull/2825#issuecomment-158128210.

This is why I'm potentially advocating for break-word everywhere.

ajb commented 8 years ago

Also see https://github.com/dobtco/dvl-core/issues/208

jrubenoff commented 8 years ago

I'm down with adding it anywhere that has with user-submitted content generated from a textarea, including this.

ajb commented 8 years ago

What about if the user includes a really long word in the subject line?

img

This is why I advocate adding the property to the body selector.

ajb commented 8 years ago

Here's some more discussion: http://stackoverflow.com/questions/6935040/disadvantages-to-using-css-word-wrap-globally

A cherry-picked quote:

I can't think of any disadvantages since, if you want to have some other kind of word-wrap elsewhere, you'll always be able to override this global style.

Basically, I want to make life easy for developers. Trying to remember to include the mixin every time we output user-entered text is going to be hell. It's not just WYSIWYG content... plenty of text comes from text inputs, too, like in the subject line above.