How to Inspect CSS Hyphenation Dictionaries and Flow in Safari Web Inspector

Justified text and narrow columnar layouts often create unsightly whitespace gaps—known in typography as "rivers of white"—when words are too long to fit comfortably on a single line. The hyphens: auto CSS property instructs the browser to insert soft hyphens automatically using language-specific algorithmic dictionaries. However, WebKit’s implementation in Safari requires strict language tag inheritance and hyphenation character declarations to render correctly. Using Safari Web Inspector, developers can inspect active hyphenation rules, diagnose language dictionary mismatches, and maintain clean editorial columns.

Understanding the CSS hyphens Property

The hyphens property controls how text is hyphenated across line breaks:

  • none: Prevents hyphenation entirely. Words wrap onto the next line as whole units, even if manual soft hyphens (­) are present in the HTML markup.
  • manual (Default): Only hyphens words where explicit soft hyphens (­) or hard hyphens (-) are written into the document.
  • auto: Enables automatic language-aware hyphenation based on the element’s resolved lang attribute. Safari inspects its built-in system dictionary to break words at natural syllable boundaries.

Configuring Responsive Hyphenation with WebKit Vendor Prefixes

To ensure robust compatibility across older iOS releases and macOS Safari, implement appropriate vendor-prefixed rules and hyphenation constraints:

/* Hardened typography container */
.article-body p {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
    
    /* Limit consecutive hyphens to preserve visual aesthetics */
    -webkit-hyphenate-limit-lines: 2;
    hyphenate-limit-lines: 2;
    
    /* Set minimum characters before and after hyphen break */
    -webkit-hyphenate-limit-chars: 6 3 3;
    hyphenate-limit-chars: 6 3 3;
}

Inspecting Hyphenation Rules in Safari Web Inspector

To verify hyphenation behaviour using Safari Web Inspector:

  1. Open the website in Safari on macOS.
  2. Right-click on the paragraph or column and select Inspect Element.
  3. In the Elements tab, verify the root HTML or parent container tag has a valid language attribute:
    <html lang="en-GB">

    If the lang attribute is missing, Safari disables hyphens: auto entirely because it cannot select the correct syllable dictionary.

  4. Check the Styles panel to ensure -webkit-hyphens: auto is computed as active and not overridden by utility classes.
  5. Switch to the Computed tab and verify that hyphens evaluates to auto.

Debugging Hyphenation on iOS Devices

Because iOS system dictionaries handle language variants (such as British English vs American English) strictly:

  • Connect your iPhone to your Mac via USB and inspect the live Safari tab under the Develop menu.
  • Resize the viewport using Safari’s Responsive Design Mode (Option + Command + R). Observe how narrow widths (320px to 390px) break long words gracefully rather than triggering horizontal overflow.
  • Check that words are not broken into fragments with fewer than three letters on either side, ensuring readable typographic rhythm.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.