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

Alignment: paragraph and text columns block alignment attribute name is width #7912

Closed
designsimply opened this issue Jul 12, 2018 · 1 comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality

Comments

@designsimply
Copy link
Member

Moved from #4010 h/t @bradyvercher.

Paragraph Block

The attribute name for the block-level alignment is width, which doesn't seem to make much sense. Naming this something like blockAlign would be a little more clear, especially since the width attribute is a number in some other blocks.

Or the inline alignment attribute could be named textAlign since that's the property used when applying the inline style.

See

getEditWrapperProps( attributes ) {
const { width } = attributes;
if ( [ 'wide', 'full', 'left', 'right' ].indexOf( width ) !== -1 ) {
return { 'data-align': width };
}

Text Columns

Uses the width attribute for alignment.

See

getEditWrapperProps( attributes ) {
const { width } = attributes;
if ( 'wide' === width || 'full' === width ) {
return { 'data-align': width };
}

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Jul 12, 2018
@designsimply designsimply added the [Type] Code Quality Issues or PRs that relate to code quality label Jul 12, 2018
@mtias mtias removed the [Type] Bug An existing feature does not function as intended label Jul 19, 2018
@youknowriad
Copy link
Contributor

Closing as the paragraph don't support this attribute anymore and the text block is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

3 participants