Skip to content

Commit b06e258

Browse files
List Item: Add background image, size, and gradient support
1 parent cd9efcf commit b06e258

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎docs/reference-guides/core-blocks/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ An individual item within a list.
451451
- **Category:** [text](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-text/)
452452
- **Parent:** core/list
453453
- **Allowed Blocks:** core/list
454-
- **Supports:** anchor, color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~, ~~html~~
454+
- **Supports:** anchor, background (backgroundImage, backgroundSize, gradient), color (background, gradients, link, text), interactivity (clientNavigation), spacing (margin, padding), splitting, typography (fontSize, lineHeight), ~~className~~, ~~html~~
455455
- **Attributes:** content, placeholder
456456

457457
## Login/out

‎packages/block-library/src/list-item/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
3333
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
3434
- [`className`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#classname): `false`
3535
- [`splitting`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#splitting): `true`
36+
- [`background`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#background):
37+
- `backgroundImage`: `true`
38+
- `backgroundSize`: `true`
39+
- `gradient`: `true`
3640
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
3741
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
3842
- [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`

‎packages/block-library/src/list-item/block.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"html": false,
2525
"className": false,
2626
"splitting": true,
27+
"background": {
28+
"backgroundImage": true,
29+
"backgroundSize": true,
30+
"gradient": true
31+
},
2732
"__experimentalBorder": {
2833
"color": true,
2934
"radius": true,

0 commit comments

Comments
 (0)