List Item
An individual item within a list.
Block Relationships
Parent blocks (direct):
– core/list
Allowed inner blocks:
– core/list
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
placeholder |
string |
— | — |
content |
rich-text |
— | Source: rich-text. Selector: li. Role: content |
Supports
Defined via the supports property in block.json.
anchor:truehtml:falseclassName:falsesplitting:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:gradients:truelink:truebackground:true
spacing:margin:truepadding:true
shadow:truetypography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
CSS Selectors
Defined via the selectors property in block.json.
- root:
.wp-block-list > li - border:
.wp-block-list:not(.wp-block-list .wp-block-list) > li - shadow:
.wp-block-list:not(.wp-block-list .wp-block-list) > li
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:list-item -->
<li>Text & Headings</li>
<!-- /wp:list-item -->
Source
- block.json (reference)
- Source directory — browse the
editandsavesource files,index.php, and more.
这篇文档对你有帮助吗?
谢谢你的反馈!