Skip to content

list-style-position

Utilities for controlling the position of bullets and numbers in lists.

Class Effect
list-inside list-style-position: inside;
list-outside list-style-position: outside;

Lists are plain elements; draw the markers yourself so they follow your design. Here a bullet and a number are separate leaves aligned with items-baseline.

list-style-position: Basic examplelist-style-position: Basic example
if ui.div("grid grid-cols-2 gap-8") {
if ui.div("flex flex-col gap-2") {
for item in ([]string{"Now this is a story", "All about how", "My life got flipped"}) {
ui.key(item)
if ui.div("flex items-baseline gap-3 text-sm text-gray-700 dark:text-gray-300") {
ui.el("size-1.5 shrink-0 -translate-y-0.5 rounded-full bg-gray-400")
ui.text(item)
}
}
}
if ui.div("flex flex-col gap-2") {
for item, i in ([]string{"Now this is a story", "All about how", "My life got flipped"}) {
ui.key(item)
if ui.div("flex items-baseline gap-3 text-sm text-gray-700 dark:text-gray-300") {
ui.text(fmt.tprintf("%d.", i + 1), "w-4 shrink-0 text-right font-medium text-gray-400 tabular-nums")
ui.text(item)
}
}
}
}