In web typography and structured content design, ordered and unordered lists (<ol> and <ul>) convey hierarchies, sequential procedures, and navigation menus. The CSS list-style-type property dictates the visual glyph, numerical numbering format, or alphabetical sequence displayed alongside each list item marker.
While standard values like disc, circle, and decimal are widely supported, WebKit in Safari provides robust support for comprehensive international numeral systems—including cjk-decimal, hiragana, hebrew, armenian, and georgian—as well as modern keyword values like disclosure-open, disclosure-closed, and arbitrary string markers (e.g., list-style-type: "👉 "). This tutorial demonstrates how to inspect, test, and control list-style-type values using Safari Web Inspector.
Understanding CSS list-style-type and Marker Rendering in WebKit
The list-style-type property modifies the contents of the pseudo-element marker (::marker) generated by any element with display: list-item.
Supported keyword categories include:
- Unordered Glyphs:
disc(default for<ul>),circle,square, andnone. - Numeric Systems:
decimal,decimal-leading-zero,arabic-indic,devanagari, andbengali. - Alphabetic and Classical Systems:
lower-alpha,upper-alpha,lower-roman,upper-roman,lower-greek,hiragana, andkatakana. - Interactive UI Symbols:
disclosure-openanddisclosure-closed(commonly used for collapsible accordion widgets). - Custom String Literals: Strings such as
list-style-type: "✓ "or emoji characters ("📌 ").
Because lists inherit properties down through nested sub-lists, inspecting the computed styles in Safari Web Inspector helps identify why bullet formats inadvertently revert or fail to align.
Step 1: Open Safari Web Inspector
- Launch Safari on macOS.
- Ensure developer features are enabled under Safari > Settings > Advanced by ticking Show features for web developers.
- Navigate to the webpage containing the list elements you want to evaluate.
- Right-click the target bullet point or list container and choose Inspect Element (or press Cmd + Option + I).
- Ensure the Elements tab is selected in the Web Inspector top navigation bar.
Step 2: Inspect list-style-type in the Styles Pane
- In the DOM tree, locate the parent
<ul>,<ol>, or individual<li>element. - In the right-hand panel, inspect the Styles sub-pane.
- Locate the rule applying
list-style-typeor shorthandlist-style(e.g.,list-style: square inside;). - Click the Computed tab to verify the final resolved value assigned by WebKit after processing cascade inheritance and user-agent stylesheets.
Step 3: Modify and Test Values Live in Web Inspector
You can test different bullet formats directly within Safari without modifying your local source files:
- Double-click the value next to
list-style-typein the Styles pane. - Replace the existing value with another keyword (e.g., change
disctosquareorlower-roman). - Observe the browser window: WebKit repaints the bullet indicators instantaneously.
- Test Custom Emoji / String Markers: Type a quoted string, such as
"🔥 "or"➔ ". Safari immediately displays the custom string as the marker prefix before each item. - Test Collapsible Disclosure Indicators: Set the value to
disclosure-closedordisclosure-opento see standard OS-native disclosure triangles.
Step 4: Inspecting the ::marker Pseudo-Element
To style or inspect the specific font, colour, and positioning applied directly to the bullet glyph:
- In the DOM tree, expand the target
<li>element. - Safari Web Inspector reveals the internal shadow/pseudo node:
::marker. - Select
::markerto inspect its distinct CSS properties in the Styles pane. - You can assign unique colors, font sizes, or animations to the marker without altering the adjacent body text:
li::marker { color: #2563eb; font-size: 1.2em; }
Troubleshooting Common List Marker Issues
- Markers Overlap Container Margins: By default, list markers render with
list-style-position: outside, causing bullets to hang outside the bounding box. If bullets are cut off by an ancestor withoverflow: hidden, changelist-style-positiontoinsideor adjust the left padding on the<ul>. - Custom Strings Cut Off on Mobile: When using wide unicode characters or emojis as string markers in
list-style-type, ensure sufficient left padding (e.g.,padding-inline-start: 2rem;) to avoid clipping along the viewport boundary. - List Items Missing Bullets Entirely: If list markers fail to appear despite valid
list-style-typedeclarations, check whether a CSS reset appliedlist-style: none, or whetherdisplay: blockordisplay: flexwas applied to the<li>, which strips the nativelist-itemcounter box.