bishopZ / Typecast.js

No Longer Maintained - Typecast.js :: typing for Javascript
http://typecastjs.com/
30 stars 2 forks source link

Word wrapping on typecastjs.org is broken #5

Closed roryokane closed 10 years ago

roryokane commented 11 years ago

The following CSS in styles.css has a problem:

/* prevents long URLs from spilling out of divs */
.comment,textarea,blockquote,label,p,td,th,h1,h2,h3,h4,h5,h6 {
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    word-break: break-word; /* Non standard for webkit */
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

Becuase of this style, on my screen, I see line breaks like these when reading the opening paragraphs on typecastjs.org:

It works both in a browser and on Node.js servers. Type cast pairs well with jQuery …

…, while for only 10k more, Typecast provides over 200 additional helper fun ctions.

… reducing both bugs and troublesho oting time.

Words are not supposed to be broken randomly in the middle of words. If they are broken, they should be broken on syllables, and there should be a hyphen at the end of the broken line.

The problem is fixed in Firefox when I disable the word-break: break-all; rule in Firebug. But I don't know if that change breaks the wrapping of “long URLs” anywhere else.

bishopZ commented 11 years ago

yep. thanks for the post! this will be fixed in the next version.

bishopZ commented 10 years ago

This is a problem with Stylist. Moving it to that issues page: https://github.com/bishopZ/Stylist.css/issues/1