Skip to content

CSS: list

.instui-list — Rhestr gyda gofod eitemau a reolir gan tocyn.

Yn gosod ei padding-inline-start ei hun ar gyfer indentyfiad rhestr; mae cadw modiwr cyfleus lleoliad -p*/-padding* wrth gysylltu yn disodli'r gwerth adeiledig hwnnw. Edrychwch ar yr aelod list.item ar gyfer y eitemau unigol.

Source: list.css

Defnydd

css
@import "@pantoken/components/components.css";
@import "@pantoken/components/list.css";

Enghreifftiau

html
<ul class="instui-list">
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ul>

Strwythur

text
.instui-list
  li (0..n)
flowchart TD n0[".instui-list"]:::cssdoc-root n1("li"):::cssdoc-part n0 -->|0..n| n1 classDef cssdoc-root stroke-width:1px; classDef cssdoc-part stroke-width:1px; classDef cssdoc-slot stroke-width:1px; classDef cssdoc-component stroke-width:1px;

Modyfiwyr

ModyfiwrDisgrifiad
.-inlineTrefnu eitemau yn linellol (lorweddol).
.-size-largeMawr. @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd. Enw hir o -size-lg.
.-size-lgMawr. @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd.
.-size-mdCanol (diofyn). @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd.
.-size-mediumCanol (diofyn). @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd. Enw hir o -size-md.
.-size-smBach. @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd.
.-size-smallBach. @affects list.item — Mae'n addasu gofod yr eitemau i gyd-fynd. Enw hir o -size-sm.
.-unstyledDileu marcwyr a phad.

Tocynnau a ddefnyddiwyd

TokenMathGwerth
--instui-component-list-item-color<color>LightDarklight-dark(#273540, #ffffff)
--instui-component-list-item-font-family[ <font-family-name> | <generic-font-family> ]#Atkinson Hyperlegible Next, "Helvetica Neue", Helvetica, Arial, sans-serif
--instui-component-list-item-font-size-large<length>1.25rem
--instui-component-list-item-font-size-medium<length>1rem
--instui-component-list-item-font-size-small<length>0.875rem
--instui-component-list-item-font-weight<integer>400
--instui-component-list-item-line-height<percentage>150%
--instui-component-list-item-spacing-medium<length>1.5rem
--instui-component-list-list-padding<length>2.25rem

Is-gydrannau