A missing URL should produce no marker and no crash. The list items are still indented normally.
missing URL list-style-image: url('nonexistent.png'); |
none (baseline) list-style-image: none; |
disc (no image) list-style-type: disc; |
decimal (no image) list-style-type: decimal; |
Each list item marker is a gradient-filled square, sized to the current font height.
to right red→blue list-style-image: linear-gradient(to right, red, blue); |
to bottom green→yellow list-style-image: linear-gradient(to bottom, green, yellow); |
45deg multi-stop list-style-image: linear-gradient(45deg, red, yellow, blue); |
hard-stop stripes list-style-image: linear-gradient(to right, red 50%, blue 50%); |
circle center list-style-image: radial-gradient(circle, white, navy); |
ellipse default list-style-image: radial-gradient(red, blue); |
at 30% 30% list-style-image: radial-gradient(circle at 30% 30%, yellow, orange, red); |
closest-side list-style-image: radial-gradient(closest-side circle at 50% 50%, lime, teal); |
default sweep list-style-image: conic-gradient(red, blue); |
pie chart list-style-image: conic-gradient(#e74c3c 0 25%, #3498db 25% 65%, #2ecc71 65% 100%); |
from 90deg list-style-image: conic-gradient(from 90deg, red, yellow, blue); |
color wheel list-style-image: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); |
A single list-style shorthand value setting both position and image.
inside linear list-style: inside linear-gradient(to right, purple, orange); |
inside radial list-style: inside radial-gradient(circle, gold, crimson); |
inside conic list-style: inside conic-gradient(red 0 33%, blue 33% 66%, green 66% 100%); |
outside linear list-style: outside linear-gradient(45deg, teal, pink); |
Left column uses a gradient list-style-image; right uses list-style-type only. Neither should interfere.
gradient image list-style-image: linear-gradient(to right, red, blue); |
disc (no image) list-style-type: disc; list-style-image: none; |
circle (no image) list-style-type: circle; list-style-image: none; |
square (no image) list-style-type: square; list-style-image: none; |
A url() list-style-image source can now be an SVG - rendered as real vector content, not rasterized, same as the SVG background-image support above.
SVG url() image list-style-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSIjYzAzOTJiIi8+PGNpcmNsZSBjeD0iNSIgY3k9IjUiIHI9IjQiIGZpbGw9IiNmMWM0MGYiLz48L3N2Zz4='); |
shorthand: inside + SVG list-style: inside url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSIjYzAzOTJiIi8+PGNpcmNsZSBjeD0iNSIgY3k9IjUiIHI9IjQiIGZpbGw9IiNmMWM0MGYiLz48L3N2Zz4='); |
shorthand: outside + SVG list-style: outside url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMCAxMCI+PHJlY3Qgd2lkdGg9IjEwIiBoZWlnaHQ9IjEwIiBmaWxsPSIjYzAzOTJiIi8+PGNpcmNsZSBjeD0iNSIgY3k9IjUiIHI9IjQiIGZpbGw9IiNmMWM0MGYiLz48L3N2Zz4='); |
missing SVG file (graceful fallback) list-style-image: url('nonexistent.svg'); |