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

Use support align for image block #18371

Closed

Conversation

spacedmonkey
Copy link
Member

Description

Use support align for image block instead of implementing manually.

Fixes #13780
Related #17799

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@spacedmonkey
Copy link
Member Author

The issue seems to be this in the tests

- <div class="wp-block-image"><figure class="alignleft is-resized"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==" alt="" width="100" height="100"/></figure></div>
+ <div class="wp-block-image alignleft"><figure class="alignleft is-resized"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==" alt="" width="100" height="100"/></figure></div>

It seems after the change, the wrapping div on longer has the alignment classes. Not sure why this is the case.

@earnjam
Copy link
Contributor

earnjam commented May 13, 2020

Based on @youknowriad's comment on the linked issue, it appears this isn't really feasible right now.

There is also a lot of discussion about rethinking the approach to block alignment as a whole in #20650.

In light of that and this PR being outdated now, @spacedmonkey are you ok with closing this in favor of future work based on the outcomes of discussions in #20650?

@spacedmonkey
Copy link
Member Author

Happy to close this

@earnjam earnjam closed this May 13, 2020
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

Successfully merging this pull request may close these issues.

Update core/image block to use align supports
2 participants