WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] [closed] Strange word breaks in posts since 1.1 update (12 posts)

  1. rgeens
    Member
    Posted 1 year ago #

    I updated Twenty Twelve to 1.1 today and noticed there were suddenly strange word breaks at the end of lines in posts where previously there were none. If I switch to Twenty Ten or Twenty Eleven the breaks are gone. I've downgraded Twenty Twelve to 1.0 and the breaks are gone as well. While googling I came across this post about a recent fix related to word breaks in comments. Could this be related to the Twenty Twelve update?

  2. MarkRH
    Member
    Posted 1 year ago #

    Trying adding the following over-rides to your theme's style.css (I am using a twentytwelve child theme on my test blog):

    /* =Main content and comment content
    -------------------------------------------------------------- */
    .site-content article {
    	word-wrap: break-word;
    	-webkit-hyphens: none;
    	-moz-hyphens: none;
    	hyphens: none;
    }

    This will cause it to break really long words that are longer than the post width but will stop it from breaking shorter words using hyphens. I can't stand those things. Actually makes it harder to read.

  3. Lance Willett
    Themer
    Posted 1 year ago #

    @rgeens Were you seeing the hyphenation in only a particular browser? Just in case this is a wider thing we need to fix, could you share:

    1) A live URL to test this on (if you're still on 1.1 that is)
    2) Which browser and OS you saw it in

    Thanks!

  4. rgeens
    Member
    Posted 1 year ago #

    Hi Lance,

    I've updated to 1.1 for testing purposes. I'm only seeing it on Firefox, both on Windows 7 and Ubuntu 12.04. The Windows one is Firefox 17.0.1. In IE9 there are no breaks. In Chrome there's only one word break at the end of a line: a word with a hypen in it is split at the hyphen, which is fine for me.

    The site is http://www.wonderingmonster.be .

  5. rgeens
    Member
    Posted 1 year ago #

    Thanks for the tip Mark, that's good to know.

  6. Lance Willett
    Themer
    Posted 1 year ago #

    @rgreens Thanks for the information; we'll do some debugging and see if it's something that needs addressing in the theme — or if it's just a browser quirk which we have to live with.

  7. MarkRH
    Member
    Posted 1 year ago #

    Yes, I am using Firefox 17.0.1 in Windows 7 Pro 64-bit. It was keying off the -moz-hyphens: auto; I found some information here: https://developer.mozilla.org/en-US/docs/CSS/hyphens

    Apparently, IE 10 is the first version of IE to do this under certain languages. Seems to be in an experimental state at the moment. Personally, I can't stand words being broken up at all unless they are just too long for the width of the post (unless it's a code snippet in which case it should be in a scrollable box). Maybe the -webkit-hyphens could be kept on auto for mobile devices?

    Here's my site: http://blog.markheadrick.com/ but since I've changed the CSS it's not going to show the hyphenations now.

  8. Lance Willett
    Themer
    Posted 1 year ago #

    OK, so I found more information via PPK's site: http://www.quirksmode.org/blog/archives/2012/11/hyphenation_wor.html

    One thing to check when you see incorrect word breaking, is the language of the WP site site up correctly?

    Turns out the lang attribute must be set correctly in the opening html tag.

    Looking at http://www.wonderingmonster.be/ — it's set to "en" so it's probably not using the correct language to hyphenate.

    Twenty Twelve outputs the language value via language_attributes() which gets the language option for the blog from get_bloginfo( 'language' ). See more at http://codex.wordpress.org/Function_Reference/language_attributes

    Now, if the blog is English and has "en-US" set as lang, for example — and still has hyphenation issues, it could be just a browser or dictionary implementation problem.

  9. rgeens
    Member
    Posted 1 year ago #

    The site is the default en-US while the text is in Dutch. Setting the lang attribute to nl results in slightly different word breaks but they still look bad, so I guess that's an issue in Firefox. I don't particularly want hyphenation, so I've followed Mark's advice and disabled it through a child theme. Thanks for the help guys!

  10. ChadAustin
    Member
    Posted 1 year ago #

    Excellent- this worked for me (Yes, I'm using FF).

  11. bjornsennbrink
    Member
    Posted 1 year ago #

    I tested the new Twenty Thirteen theme and the stupid word-breaking is in that theme too. I added what Mark suggested above (for .hentry) and now I can read my blog just fine. This should not be in the official theme imo.

  12. Andrew
    Forum Moderator
    Posted 1 year ago #

    I'm closing this thread as it had been resolved a while back.

    If you want to make or discuss recommendations for WordPress, use the Requests and Feedback forum.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.