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

Add block alignment support #179

Merged
merged 2 commits into from
Dec 18, 2020
Merged

Add block alignment support #179

merged 2 commits into from
Dec 18, 2020

Conversation

yscik
Copy link
Contributor

@yscik yscik commented Nov 17, 2020

Code lines are usually longer than text content, and do not work well wrapped, so supporting block alignment options like wide and full width can make life easier.

Changes proposed in this Pull Request

  • Move block classes to top-level wrapper element, with wp-block-syntaxhighlighter-code class.
  • Add block alignment support

Testing instructions

  • Use a theme with Wide/Full block alignment support, like Twenty Twenty
  • Add a Syntaxhighlighter code block, set some block alignment
  • Check that it works on the frontend

@yscik yscik added this to the v3.6.0 milestone Nov 17, 2020
@yscik yscik requested a review from jom November 17, 2020 15:53
Base automatically changed from change/refactor-block to master December 17, 2020 15:56
Copy link
Member

@jom jom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something with this breaks/does not transform when editing an existing block from master.

@yscik
Copy link
Contributor Author

yscik commented Dec 18, 2020

Looks like this was just an issue of the base not containing the encoding-related fixes. Rebased onto current master and it's working, even with blocks from 3.5.5.

Copy link
Member

@jom jom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@yscik yscik merged commit f6b0150 into master Dec 18, 2020
@yscik yscik deleted the add/block-alignment branch December 18, 2020 18:11
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.

Empty div and no additional class added to code block
2 participants