Skip to content

Archives Block: Padding setting in JSON isn't respected in the editor #70695

@iamtakashi

Description

@iamtakashi

Description

For example, I'd like to reduce the left padding of the Archives block.

Image

So I set the padding in the theme.json

"styles": {
	"blocks": {
		"core/archives": {
			"spacing": {
				"padding": {
					"left": "0"
				}
			}
		}
	}
}

This works on the front of the site.

Image

However, the block remains unchanged in the editor due to this default style overriding the custom style.

ul.wp-block-archives {
    padding-left: 2.5em;
}

Image

Related:

Step-by-step reproduction instructions

  • Go to the editor
  • Add an archives block
  • Add custom padding value in the theme.json
  • See the block in the editor

Screenshots, screen recording, code snippet

No response

Environment info

  • WP:6.8.2
  • Gutenberg: Trunk

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

    [Block] ArchivesAffects the Archives Block[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