Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TT1 blocks: Enable margin support in theme.json for 10.7 #260

Open
carolinan opened this issue May 12, 2021 · 4 comments
Open

TT1 blocks: Enable margin support in theme.json for 10.7 #260

carolinan opened this issue May 12, 2021 · 4 comments

Comments

@carolinan
Copy link
Collaborator

This is more of a heads up that we can start working on adding support for margins via theme.json for Gutenberg 10.7.

@bobbingwide
Copy link

Can you add a hint to how this can be done? eg an extract from theme.json

@pbking
Copy link
Collaborator

pbking commented Jun 3, 2021

There is some information regarding theme.json support here. Specifically customMargin must be enabled via theme.json (it defaults to false). Once that is done in the same way that 'padding' can be added to block style configuration so too can margin. e.g.:

	"core/group": {
		"spacing": {
			"margin": {
				"top": "10px",
...

Not all blocks support user-controlled margins (not many at this point). I haven't explored this much but most (all?) blocks SHOULD have the ability to have margins configured via theme.json - user support configured via block.json or not. But I have not confirmed this.

@MaggieCabrera
Copy link
Collaborator

Is there anything we need to do about this?

@carolinan
Copy link
Collaborator Author

Theme.json already includes "appearanceTools": true, but we need version 2 for it to work. I set it to 2 in #307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants