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

Block Editor Handbook -> Reference Guides -> Block API Reference -> Supports -> Spacing has not working example for default attributes #1804

Open
silaskoehler opened this issue Nov 29, 2024 · 1 comment
Labels
[Status] To do Issue marked as Todo

Comments

@silaskoehler
Copy link

Issue Description

The example code for default attributes for spacing is not correct i think.

attributes: {
    style: {
        margin: 'value',
        padding: {
            top: 'value',
        }
    }
}

This does not work for me, but it worked, if i add spacingto the object:

attributes: {
    style: {
        spacing: {
            margin: 'value',
            padding: {
                top: 'value',
            }
        }
    }
}

URL of the Page with the Issue

https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing

Section of Page with the issue

Spacing

Suggested Fix

change documentation example to:

attributes: {
    style: {
        spacing: {
            margin: 'value',
            padding: {
                top: 'value',
            }
        }
    }
}
@silaskoehler silaskoehler added the [Status] To do Issue marked as Todo label Nov 29, 2024
Copy link

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] To do Issue marked as Todo
Projects
None yet
Development

No branches or pull requests

1 participant