zfb
GitHub repository

Type to search...

to open search from anywhere

List style

Set list markers and whether markers appear inside or outside the content box.

Choose a list marker and place it inside or outside the list item’s text box. These classes style semantic ul and ol elements; they do not create list structure for you.

Quick reference

Example classExpected declarations
list-disclist-style-type: disc;
list-decimallist-style-type: decimal;
list-nonelist-style-type: none;
list-insidelist-style-position: inside;
list-outsidelist-style-position: outside;
Example setup

The shared preview base explicitly selects spec 1, reset none, strict mode, spacingUnit 0.25rem, and no breakpoints. The authored CSS lays out demo cards but leaves list-style-type and list-style-position to the utilities. Semantic list markup supplies the item structure.

Examples in use

Choose a marker type

Semantic unordered and ordered lists compare disc, decimal, and no visible marker.

Choose a marker type
HTML
<div class="wind-demo-list-types">
  <section><strong>Bullets</strong><ul class="list-disc"><li>Choose a route</li><li>Check the source</li></ul></section>
  <section><strong>Steps</strong><ol class="list-decimal"><li>Choose a route</li><li>Check the source</li></ol></section>
  <section><strong>Marker-free links</strong><ul class="list-none"><li>Overview</li><li>Reference</li></ul></section>
</div>
CSS
@layer zw-reset, zw-tokens, zfb-hi, base, components;
@layer zw-tokens {
  :root {
    --zw-spacing-unit: .25rem;
  }
}
.wind-demo-list-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem;
  color: #223247;
}

.wind-demo-list-types section {
  border: 1px solid #b7c5d4;
  padding: .75rem 1rem;
}

.wind-demo-list-types strong {
  color: #5d6c7c;
  font-size: .8rem;
}
.list-decimal {
  list-style-type: decimal;
}
.list-disc {
  list-style-type: disc;
}
.list-none {
  list-style-type: none;
}
Configuration for this example
{
  "wind": {
    "spec": 1,
    "reset": "none",
    "strict": true,
    "tokens": {
      "spacingUnit": "0.25rem"
    },
    "breakpoints": {},
    "defaultTransitionTimingFunction": "ease",
    "authoredClasses": {
      "wind-demo-list-types": true
    },
    "safelist": {
      "docs-preview": [
        "list-disc",
        "list-decimal",
        "list-none"
      ]
    }
  }
}
Authored demonstration CSS
.wind-demo-list-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; color: #223247; }
.wind-demo-list-types section { border: 1px solid #b7c5d4; padding: 0.75rem 1rem; }
.wind-demo-list-types strong { color: #5d6c7c; font-size: 0.8rem; }

Place markers with wrapped text

The same long list item shows how inside and outside markers align with the second line.

Place markers with wrapped text
HTML
<div class="wind-demo-list-positions">
  <section><strong>Outside</strong><ul class="list-disc list-outside"><li>A long item wraps onto a second line so the marker position stays easy to compare. / 長い項目は2行目に折り返されます。</li><li>Another item</li></ul></section>
  <section><strong>Inside</strong><ul class="list-disc list-inside"><li>A long item wraps onto a second line so the marker position stays easy to compare. / 長い項目は2行目に折り返されます。</li><li>Another item</li></ul></section>
</div>
CSS
@layer zw-reset, zw-tokens, zfb-hi, base, components;
@layer zw-tokens {
  :root {
    --zw-spacing-unit: .25rem;
  }
}
.wind-demo-list-positions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .75rem;
  color: #223247;
}

.wind-demo-list-positions section {
  min-width: 0;
  border: 1px solid #b7c5d4;
  padding: .75rem;
}

.wind-demo-list-positions strong {
  color: #5d6c7c;
  font-size: .8rem;
}
.list-disc {
  list-style-type: disc;
}
.list-inside {
  list-style-position: inside;
}
.list-outside {
  list-style-position: outside;
}
Configuration for this example
{
  "wind": {
    "spec": 1,
    "reset": "none",
    "strict": true,
    "tokens": {
      "spacingUnit": "0.25rem"
    },
    "breakpoints": {},
    "defaultTransitionTimingFunction": "ease",
    "authoredClasses": {
      "wind-demo-list-positions": true
    },
    "safelist": {
      "docs-preview": [
        "list-disc",
        "list-outside",
        "list-inside"
      ]
    }
  }
}
Authored demonstration CSS
.wind-demo-list-positions { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; color: #223247; }
.wind-demo-list-positions section { min-width: 0; border: 1px solid #b7c5d4; padding: 0.75rem; }
.wind-demo-list-positions strong { color: #5d6c7c; font-size: 0.8rem; }

Custom and named values

list-disc, list-decimal, and list-none select the marker type. list-inside and list-outside control marker placement independently, so combine one marker type with one position when both matter. A list-none navigation still needs meaningful link text and accessible navigation semantics. The catalog currently exposes these fixed choices, with no named marker token or arbitrary marker syntax.

Related guides: Utility grammar · Variants

Catalog details

list-decimal

FieldValue
Catalog identifierv1.list-decimal
Class patternlist-decimal
Grammar{"acceptedKinds":["exact"],"arbitraryProperty":null,"allowsFractionSlash":false,"allowsColorOpacity":false}
Accepted values1
Token categoriesNo token category
Negative-value policyforbidden
Conflict group and ranklist (41)
Order rank0
Selector shapeownElement
Spec version1
Emitter propertieslist-style-type

Accepted values

KindSuffixEmitted value
exactnull"decimal"

Declaration templates

PropertyValue kindFixed value
list-style-typeresolvednull

Catalog examples

Example classExpected declarations
list-decimallist-style-type: decimal

list-disc

FieldValue
Catalog identifierv1.list-disc
Class patternlist-disc
Grammar{"acceptedKinds":["exact"],"arbitraryProperty":null,"allowsFractionSlash":false,"allowsColorOpacity":false}
Accepted values1
Token categoriesNo token category
Negative-value policyforbidden
Conflict group and ranklist (41)
Order rank0
Selector shapeownElement
Spec version1
Emitter propertieslist-style-type

Accepted values

KindSuffixEmitted value
exactnull"disc"

Declaration templates

PropertyValue kindFixed value
list-style-typeresolvednull

Catalog examples

Example classExpected declarations
list-disclist-style-type: disc

list-inside

FieldValue
Catalog identifierv1.list-inside
Class patternlist-inside
Grammar{"acceptedKinds":["exact"],"arbitraryProperty":null,"allowsFractionSlash":false,"allowsColorOpacity":false}
Accepted values1
Token categoriesNo token category
Negative-value policyforbidden
Conflict group and ranklist (41)
Order rank0
Selector shapeownElement
Spec version1
Emitter propertieslist-style-position

Accepted values

KindSuffixEmitted value
exactnull"inside"

Declaration templates

PropertyValue kindFixed value
list-style-positionresolvednull

Catalog examples

Example classExpected declarations
list-insidelist-style-position: inside

list-none

FieldValue
Catalog identifierv1.list-none
Class patternlist-none
Grammar{"acceptedKinds":["exact"],"arbitraryProperty":null,"allowsFractionSlash":false,"allowsColorOpacity":false}
Accepted values1
Token categoriesNo token category
Negative-value policyforbidden
Conflict group and ranklist (41)
Order rank0
Selector shapeownElement
Spec version1
Emitter propertieslist-style-type

Accepted values

KindSuffixEmitted value
exactnull"none"

Declaration templates

PropertyValue kindFixed value
list-style-typeresolvednull

Catalog examples

Example classExpected declarations
list-nonelist-style-type: none

list-outside

FieldValue
Catalog identifierv1.list-outside
Class patternlist-outside
Grammar{"acceptedKinds":["exact"],"arbitraryProperty":null,"allowsFractionSlash":false,"allowsColorOpacity":false}
Accepted values1
Token categoriesNo token category
Negative-value policyforbidden
Conflict group and ranklist (41)
Order rank0
Selector shapeownElement
Spec version1
Emitter propertieslist-style-position

Accepted values

KindSuffixEmitted value
exactnull"outside"

Declaration templates

PropertyValue kindFixed value
list-style-positionresolvednull

Catalog examples

Example classExpected declarations
list-outsidelist-style-position: outside

Revision History

CreatedUpdated