How to Inspect and Control CSS list-style-image and List Markers in Safari Web Inspector

In web design and digital publication design, standard round bullets and decimal numerals on HTML unordered (<ul>) and ordered (<ol>) lists often fail to align with bespoke brand identity and visual styling requirements. While web developers frequently turn to custom SVG icons wrapped inside complex HTML structures, modern CSS provides native support for graphical list markers via the list-style-image property. Paired with list-style-position and fallback list-style-type values, list-style-image allows developers to substitute standard glyphs with external raster or vector assets. However, high-density Retina displays, SVG viewport sizing discrepancies, and asset loading failures often lead to distorted bullet alignment or missing bullets. Using Safari Web Inspector on macOS, developers can inspect list marker rendering, diagnose asset failures, and debug marker alignment in real time.

Understanding CSS List Marker Architecture

In the CSS List and Counters specification, list items (elements with display: list-item) generate a specialised pseudo-element box known as ::marker. The marker’s appearance is governed by three primary sub-properties combined in the list-style shorthand:

  • list-style-image: Specifies the URL of an external graphical asset (SVG, PNG, WebP) or a CSS gradient to be used as the list item marker. If the image resource is unavailable or set to none, the browser falls back to the configured marker type.
  • list-style-type: Defines the fallback glyph (such as disc, circle, square, or none) displayed when the graphical asset fails to load.
  • list-style-position: Dictates whether the marker is placed outside the principal block box (outside, the default) with dedicated gutter space, or embedded inline within the content box flow (inside).

Configuring Safari Web Inspector for List Styling

To audit list elements and examine marker properties in Safari on macOS, ensure Developer Features are enabled:

  1. Launch Safari on macOS.
  2. Open Settings from the menu bar or press Cmd + ,.
  3. Click the Advanced tab.
  4. Enable Show features for web developers.
  5. Right-click the list item on your target webpage and select Inspect Element.

Inspecting the ::marker Pseudo-Element in the DOM Tree

Historically, list markers were treated as opaque browser-internal rendering artefacts. In modern WebKit, Safari explicitly exposes the ::marker pseudo-element in the DOM hierarchy.

In Safari Web Inspector’s Elements tab, expand the target <li> element. Observe the child node identified as ::marker:

  1. Click directly on the ::marker pseudo-element in the DOM tree.
  2. In the right-hand inspection sidebar, select the Styles panel.
  3. Examine the active declarations affecting marker presentation:
ul.feature-list {
    list-style-image: url("/assets/icons/bullet-checkmark.svg");
    list-style-position: outside;
    list-style-type: disc;
}

WebKit displays the resolved styles and highlights any inherited rules from parent list containers.

Diagnosing SVG Sizing and Aspect Ratio Defects

The most pervasive issue encountered when using list-style-image with vector graphics (SVG) is uncontrolled scaling. Unlike standard <img> elements, list-style-image does not accept explicit CSS width or height properties directly on the marker.

When WebKit renders an SVG as a list marker:

  • If the SVG file lacks explicit width and height attributes in its root <svg> element, or only specifies a viewBox, Safari may render the icon at extreme dimensions (such as 300×150 pixels), breaking page flow.
  • To verify the intrinsic dimensions of the referenced asset in Web Inspector, navigate to the Network tab, filter by Images, and locate the loaded SVG resource. Inspect its preview and reported intrinsic pixel boundaries.

To fix oversized SVG markers without modifying the original asset file, modern CSS allows styling the ::marker directly:

li::marker {
    font-size: 1.2rem;
    color: #0070c9;
}

Auditing list-style-position and Text Wrapping

When list items contain multiline descriptive copy, improper positioning values disrupt typographic hierarchy:

  • list-style-position: outside (Default): The marker sits outside the left padding boundary of the list. Subsequent lines of text wrap cleanly beneath the first character of the paragraph, maintaining a clear vertical gutter.
  • list-style-position: inside: The marker is treated as the first inline word of the paragraph. When text wraps to the second line, it aligns directly flush beneath the marker rather than indenting, which can degrade legibility in lengthy content blocks.

In the Styles panel of Safari Web Inspector, toggle between inside and outside dynamically to verify wrapping behaviour across responsive viewports.

Testing Fallback Rendering and Network Failures

To ensure your user interface degrades gracefully when third-party CDNs fail or slow network conditions delay asset retrieval, test fallback rendering directly in Web Inspector.

  1. In the Styles panel for the target list, locate the list-style-image declaration.
  2. Uncheck the checkbox adjacent to the list-style-image rule.
  3. Observe the immediate fallback to the list-style-type glyph (e.g., disc or square).
  4. Verify that the text baseline alignment, margins, and line height remain visually balanced when the fallback bullet displays.

Get the best tech tips delivered straight to your inbox.

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