How do you stop hyphenation in all styles?

Latest PB and McLuhan Theme

You could add the following to Custom Styles:

* {
  adobe-hyphenate: none;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  -epub-hyphens: none;
  hyphens: none;
}

(Ref: https://friendsofepub.github.io/eBookTricks/#typo-hyphens)

Right now we only support explicit enabling/disabling of hyphenation for PDF but if this is a feature you’d like to see in Theme Options for Web and Ebooks as well, please open an issue on https://github.com/pressbooks/ideas.

Your CSS did not work for Web in McLuhan or Open Textbook. Do I have to do something else?

What browser are you using?

https://caniuse.com/#search=hyphens

Not sure what else can be done.

Mac Firefox 61.0.1

The following CSS seems to work in Web view:

.textbox p, .part p, .chapter p, .back-matter p, body#tinymce.wp-editor p {
hyphens: none;
}

Ref: based on previous syntax for headings CSS

Previous solutions did not disable hyphenation in current configuration with a particular book site. Is there a new CSS to force disabling the automated hyphenation? Noteworthy is that the hyphenation is disabled in Safari but not Google Chrome with the above solutions. Also this issue persist on a single book site when I changed themes from Open Textbooks to McLuhan, whereas another book worked fine in disabling hyphenation. Comparing both sites, I was unable to find any difference other than the display output.

Browser

Platform: OS X
Browser Name: Firefox
Browser Version: 86.0
User Agent String: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:86.0) Gecko/20100101 Firefox/86.0

Pressbooks Configuration

Version: 5.18.2
Book Theme: Open Textbooks
Book Theme Version: 2.1.6
Root Theme: Aldine
Root Theme Version: 1.9.1

In case anyone else needs an answer to this question. The updated working CSS:

* {
-webkit-hyphens: manual !important;
-moz-hyphens: manual !important;
-ms-hyphens: manual !important;
hyphens: manual !important;
}
3 Likes

Congrats, Margaret…at least somewhere you found a solution!