Hyphenation arrives in Firefox and Safari

Big thanks to Fontdeck’s blog for pointing this out: Hyphenation is now supported in Safari 5.1 and Firefox 6. Here’s how to add the CSS3 rule:

p { hyphens:auto; }

Well, almost. In reality Firefox and Safari still only support vendor prefixes of the hyphens property (which is fair enough as the spec is still aworking draft) so the code you’ll actually need is this:

p {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

To turn hyphenation off, replace the auto value with manual. This will ensure that automatic hyphenation is turned off, but manually inserted soft hyphens (the ­ entity) are still respected.

(via Fontdeck)

Brian Hoff
About Brian Hoff: Designer, Writer and Speaker

I’m a graphic designer living in Brooklyn, New York who loves creating compelling and useful websites and memorable interactions across the web. When I’m not designing I can be found writing, speaking and occasionally part-time teaching at colleges — all on the subject of design. I started this blog to share my passion and experiences with designers and clients. I'm most active on Twitter; say hello:


POWERED by FUSION