Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Varia: Center image block by default. #1463

Merged
merged 3 commits into from
Oct 2, 2019
Merged

Varia: Center image block by default. #1463

merged 3 commits into from
Oct 2, 2019

Conversation

allancole
Copy link
Contributor

Changes proposed in this Pull Request:

  • Center image block by default in the editor.
  • Corrects caption placement on small, resized image blocks.
  • This is a temporary solution that allows images to display consistently between the editor and the frontend. The permanent solution needs to happen in Gutenberg. See here: Image caption alignment in wrong position. WordPress/gutenberg#13684

After

Editor Frontend
image image

Related issue(s):

Fixes #1407

@allancole allancole added [Type] Bug Something isn't working [Theme] Varia labels Oct 1, 2019
@allancole allancole requested a review from iamtakashi October 1, 2019 17:36
@@ -0,0 +1,13 @@
/* Center image block by default in the editor */

.wp-block-image {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, this bit was supposed to be for the front of the site.

@iamtakashi
Copy link
Contributor

@allancole my instruction was a bit short, the first rule was supposed to be for the front of the site. because a non-resized image is still left aligned at the moment.

Screenshot 2019-10-01 at 22 28 30

…ally, unless a user explicity chooses to have the image left or right aligned
@iamtakashi
Copy link
Contributor

Thanks for the further fix. It looks good, and I'll merge it shortly.

@iamtakashi iamtakashi changed the title Varia: Center image block by default in the editor. Varia: Center image block by default. Oct 2, 2019
@iamtakashi iamtakashi merged commit 7eedb1c into master Oct 2, 2019
@iamtakashi iamtakashi deleted the fix/issue-1407 branch October 2, 2019 15:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Theme] Varia [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Varia: Manually resized image become centred align on front of site
2 participants