3 ms·
Browsers do hyphenate, and this page enables it, with the "hyphens: auto" CSS rule. https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens https://developer.m
by dfabulich 6y ago
Browsers do hyphenate, and this page enables it, with the "hyphens: auto" CSS rule. https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens
In Google Chrome, you'll see that it hyphenates "profes-sional" in the second story of the center column. It's still not enough, though, because it still leaves huge gaps in the justified text; it works best when you use width: 80ch. The page is currently using width: 600px, which is approximately 67ch.
(If you don't see hyphenation in Safari, that's because the developer didn't enable -webkit-hyphens. If you don't see hyphenation in Firefox, that's because the page's <html> tag doesn't have a lang="en" attribute.)
- jfk13 6y agoAnd if you do see hyphenation in Chrome, that's a Chrome bug (https://bugs.chromium.org/p/chromium/issues/detail?id=676270 https://bugs.chromium.org/p/chromium/issues/detail?id=676270), because the spec says the browser must only do this if the content language is known.
- sergeykish 6y agoAnd if you don't see hyphenation in Chrome, probably you use Linux (or another unsupported platform). To feel how it should insert ­ var Hyphenopoly = { require: { "en-us": "Supercalifragilisticexpialidocious" }, setup: { selectors: { ".story": {} }, CORScredentials: "omit" } } script = document.createElement('script') script.src = 'https://unpkg.com/hyphenopoly@4.5.0/min/Hyphenopoly_Loader.js' document.body.append(script)