Wrap all hyphenated compounds in or (nonstandard). For example, it never mentions the behavior of U+002D HYPHEN-MINUS, the most widespread hyphen character by far, even once. I am concerned that the current spec gives authors very little control over a simple display requirement. However, hyphens: none does not give the expected result in most browsers.įor example, see how Chrome 70/Mac renders this JSFiddle: Under hyphens, it says: none Words are not hyphenated, even if characters inside the word explicitly define hyphenation opportunities. CSS Text Level 3 does not define the exact rules for hyphenation…. Hyphenation occurs when the line breaks at a valid hyphenation opportunity…. ¹ This very spec once faced a similar issue in which unwanted hyphenation led to confusion: #2307 Current statusĬSS Text Module Level 3 does not define what hyphenation opportunities are: These documents may want to apply the behavior to the entire document, not on a case-by-case basis. documents that will primarily be read out loud.This behavior is important for documents that prioritize legibility over aesthetics, such as:
Some common examples of hyphenated compounds in English are T-shirt, long-term, and so-called. I want to prevent hyphenation/line breaking of words containing hyphens ( hyphenated compounds).