Inspect CSS list-style-type in Safari Web Inspector
In this article
- Background: Why list-style-type Matters
- How Safari Web Inspector Displays list-style-type
- Step-by-Step: Inspecting and Changing list-style-type
- Common Problems and Solutions
- Comparing Safari with Other Browsers
- How to Choose the Right Value for Your Design
- Alternatives to list-style-type
- Frequently Asked Questions
You can inspect and change the CSS list-style-type property in Safari Web Inspector by right-clicking the list element (or its parent) and selecting Inspect Element, then using the Styles pane in the right sidebar to view or edit the property. If the property is not visible, it may be inherited from a parent, or you may need to check the Computed tab to see the final applied value.
Background: Why list-style-type Matters
The list-style-type property controls the marker (bullet, number, letter, etc.) that appears next to each item in a list. In Safari, as in other modern browsers, it applies to elements with display: list-item — typically <ul> and <ol> elements, but also to any element with that display value. The property can be set globally, on a specific list, or on individual list items. Safari supports the standard CSS values like disc, circle, square, decimal, lower-alpha, upper-roman, and many others, plus the none value to hide markers entirely.
How Safari Web Inspector Displays list-style-type
When you inspect an element in Safari, the Styles pane shows all CSS rules that apply to it, with the most specific rule at the top. If a rule sets list-style-type, it will appear there. If the property is not set explicitly, you may see it under the Computed tab, which shows the final value after inheritance and default styles. To find the source of a computed value, click the small arrow next to it in the Computed tab to jump to the rule that set it.
Step-by-Step: Inspecting and Changing list-style-type
- Open the page in Safari and right-click the list (or the specific list item) you want to inspect. Choose Inspect Element.
- The Web Inspector opens with the element selected in the DOM tree. The right sidebar shows the Styles pane.
- Look for
list-style-typein the list of declarations. If you don't see it, scroll through the rules or use the filter box at the top of the Styles pane. - To change the value, click the property name or value and edit it directly. For example, change
disctosquareand press Enter. The page updates immediately. - To add a new rule, click the + icon in the Styles pane to create a new CSS rule for the selected element.
- If you want to see the final applied value, go to the Computed tab and search for
list-style-type.
Common Problems and Solutions
A frequent issue is that list-style-type appears to have no effect. This often happens because the list item has display: flex or display: grid, which removes the list-item display and thus the marker. In the Styles pane, check the display property of the <li> element. If it is not list-item, the marker won't show. Another common problem is that the marker is hidden by list-style: none on a parent, which overrides your setting due to specificity or cascade order. Use the Computed tab to verify the actual value.
Comparing Safari with Other Browsers
Safari's Web Inspector works similarly to Chrome DevTools and Firefox Developer Tools, but there are a few differences. Safari places the Styles pane on the right side by default, while Chrome uses the right side too but with a different layout. The Computed tab in Safari lists properties in alphabetical order, and you can search for a property. All three browsers support the same core list-style-type values, but Safari may have slight differences in rendering for some newer values like disclosure-closed or emoji. Always test in multiple browsers if you rely on a specific marker style.
How to Choose the Right Value for Your Design
When deciding on a list-style-type, consider the content and the visual tone. For unordered lists, disc is the default and most familiar; circle and square offer subtle variations. For ordered lists, decimal is standard, but you might use lower-alpha for a more informal look or upper-roman for an official or classic feel. If you want no marker at all, use none — but remember to add your own styling (like a custom image or icon) to maintain visual hierarchy. For navigation menus, it's common to set list-style: none and use padding and background images instead.
Alternatives to list-style-type
If you need more control over the marker appearance, you can use the ::marker pseudo-element to style the marker itself (e.g., change its color or size). You can also use list-style-image to use a custom image as the marker, or use CSS counters with the counter() function to create custom numbering schemes. For complex designs, you might discard list markers entirely and use flexbox or grid with custom icons — but that requires more CSS and may affect accessibility if not done carefully.
Frequently Asked Questions
Why can't I see list-style-type in the Styles pane?
The property may not be set by any CSS rule on that element, so it only appears in the Computed tab as the default value. Use the Computed tab to see the effective value, then click the arrow to find which rule (if any) set it.
How do I change list-style-type for only one list item?
You can apply list-style-type to the <li> element directly. In the Styles pane, select the <li> and add a rule like list-style-type: square;. The marker for that item will change, while others remain unchanged.
Does list-style-type affect accessibility?
Yes, it can. Screen readers may announce list semantics differently if you remove markers entirely. If you use list-style: none, consider adding role="list" and role="listitem" in some cases, though modern browsers handle this well. Always test with a screen reader if accessibility is important.
Can I use emoji as list markers in Safari?
Yes, you can set list-style-type: "😀"; (a string value) to use an emoji as the marker. Safari supports string values for list-style-type in modern versions. This works in both unordered and ordered lists.
Why does list-style-type not work when I set it on the <ul>?
It should work, but if the <li> elements have their own list-style-type set, that overrides the inherited value. Also, if the <li> has display: flex or display: grid, the marker is removed. Check the computed styles of the <li> to see what's happening.