How to Inspect and Control CSS font-stretch in Safari Web Inspector

Modern responsive typography frequently requires adjusting glyph width to fit narrow column widths, balance editorial headlines, or convey distinct visual hierarchy without changing the underlying font size. The CSS font-stretch property controls the condensation and expansion of typeface letterforms, selecting appropriate condensed or expanded faces from a static font family or driving continuous width axes in variable fonts. Safari Web Inspector provides dedicated computed typography inspection tools, real-time CSS stylesheet authoring, and variable font controls to preview and perfect font width rendering on macOS.

Understanding How CSS font-stretch Operates

The font-stretch property accepts both descriptive keyword values and percentage figures. Standard keyword values map to predefined condensation and expansion thresholds:

  • ultra-condensed (50%)
  • extra-condensed (62.5%)
  • condensed (75%)
  • semi-condensed (87.5%)
  • normal (100%)
  • semi-expanded (112.5%)
  • expanded (125%)
  • extra-expanded (150%)
  • ultra-expanded (200%)

When working with variable fonts equipped with a width variation axis (wdth), font-stretch accepts arbitrary percentage values (such as font-stretch: 85%;). Crucially, font-stretch does not artificially stretch or distort letterform shapes via mathematical transforms; instead, it selects designed glyph alternate outlines. In older or static fonts where no condensed face exists, Safari preserves the normal glyph width rather than introducing synthetic distortions, unless explicitly governed by font-synthesis rules.

Enabling Safari Web Inspector and Selecting Text Nodes

To inspect typography in Safari, ensure developer features are unlocked on your Mac:

  1. Open Safari, click Safari in the top menu bar, and choose Settings (or press Cmd + ,).
  2. Navigate to the Advanced tab and ensure Show features for web developers is ticked.
  3. Navigate to your webpage, right-click the heading, button, or paragraph you wish to evaluate, and choose Inspect Element.

The Web Inspector opens, immediately highlighting the target element in the Elements DOM tree.

Inspecting Computed font-stretch Values

To verify the exact typographic values resolved by WebKit’s layout engine:

  1. In the right-hand inspection sidebar, select the Computed tab.
  2. Type font-stretch into the filter bar at the top of the pane.
  3. Observe the rendered value. If the property is not explicitly set in your CSS, Safari returns the default normal (100%).
  4. Click the disclosure triangle beside font-stretch to inspect the cascading hierarchy and determine whether parent selectors, media queries, or reset stylesheets are overriding your styles.

Checking the computed tab ensures you differentiate between intended typographic rules and unintended inheritance from higher-level containers.

Auditing Variable Font Axes in Web Inspector

When using modern variable fonts, Safari Web Inspector features dedicated typography debugging tools:

  1. In the right-hand panel, click the Fonts tab (located alongside Styles and Computed).
  2. Scroll down to the Variation Axes section. If your loaded web font is variable, Safari lists all supported axes, including Weight (wght), Width (wdth), and Slant (slnt).
  3. Notice the slider control for Width. Adjusting this slider directly tests the available stretch range supported by the font designer.

This allows you to verify whether a variable font supports subtle incremental width adjustments or whether it only includes discrete step changes.

Testing Real-Time Width Adjustments in the Styles Pane

To audition new layout rules live without modifying production files, inject CSS rules inside the Styles panel:

  1. Switch back to the Styles panel in Web Inspector.
  2. Locate the target CSS rule (such as h1.hero-title or .table-header).
  3. Click inside the selector rule declaration block and add:
    font-stretch: 80%;
  4. Press Enter to apply the rule immediately.

Observe how text lines rewrap within the viewport. If you are designing editorial layouts or data tables, condensed stretch values allow headlines to fit onto a single line without reducing font size, complementing other typographic refinements like font-optical-sizing and CSS widows and orphans controls.

Handling Static Font Fallbacks

When working with standard static fonts (such as Roboto, Helvetica Neue, or Open Sans), setting an arbitrary percentage like font-stretch: 82%; will snap to the nearest available static face (such as Roboto Condensed at 75%) or fall back to normal if no corresponding face is declared inside your @font-face definitions.

Auditing font rendering across Safari’s Fonts and Computed panes guarantees that your chosen typographic stretch settings display crisp, professionally designed letterforms across every Mac and iOS display.

Get the best tech tips delivered straight to your inbox.

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