Skip to content

"core/list-item" section style not applied consistently using json-partial #71601

@djcowan

Description

@djcowan

Description

core/list-item blocks do not style consistantly when using section styles (JSON partial)
style is loaded via theme folder 'styles/block/my-style.json'

  1. List-item styles correctly when style is applied to the core/columns block
  2. styles are not applied consistently when style is applied to the core/list block

example json

{
	"$schema": "https://schemas.wp.org/trunk/theme.json",
	"version": 3,
	"slug": "imagedirect__wish-list",
	"title": "Wish List",
	"blockTypes": [
		"core/list",
		"core/columns"
	],
	"styles": {
		"color": {
			"text": "red"
		},
		"blocks": {
			"core/list-item": {
				"color": {
					"background": "#eeeeee"
				},
				"border": {
					"bottom": {
						"color": "black",
						"style": "dashed",
						"width": "1px"
					}
				}
			}
		}
	}
}

Step-by-step reproduction instructions

  1. add example json to theme directory 'theme/styles/block'
  2. add a core/list block with a core/list-item
  3. add a core/columns block with a nested core/list block containing a core/list-item
  4. apply the 'wish list' style to both blocks
  5. Note the following:
  • the list-item contained in the columns block is styled appropriately
  • the list-item contained in the list block is un-styled

Screenshots, screen recording, code snippet

Image Image Image

Environment info

WordPress - Version 6.8.2
Gutenberg - not activated or Version 21.6.0

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.jsonNeeds TestingNeeds further testing to be confirmed.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions