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

Latest Comments block: Can't center align #14358

Closed
codebykat opened this issue Mar 9, 2019 · 5 comments
Closed

Latest Comments block: Can't center align #14358

codebykat opened this issue Mar 9, 2019 · 5 comments
Labels
[Block] Latest Comments Affects the Latest Comments Block Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@codebykat
Copy link
Contributor

Describe the bug
Centering this block in the editor shows correctly in the preview, but on the front-end it is still left-aligned.

Right-aligning the block in the editor does not right-align it in either the editor preview or the front-end.

This block seems to get the class aligncenter added to it regardless of the editor settings.

To Reproduce
Steps to reproduce the behavior:

  1. Add a Latest Comments block
  2. Center it and publish the post
  3. Note that it is centered in the editor, but not the front-end
  4. Right-align it and update the post
  5. Note that it appears left-aligned both in the editor and the front-end

Expected behavior
Alignment options should work and the front-end view should match the editor preview.

Screenshots
Centered in editor:
Screen Shot 2019-03-09 at 11 03 10 AM
Front-end display:
Screen Shot 2019-03-09 at 11 03 16 AM
Right-aligned in editor:
Screen Shot 2019-03-09 at 11 13 01 AM

CSS in inspector:
Screen Shot 2019-03-09 at 11 11 16 AM

Desktop (please complete the following information):

  • OS: OSX
  • Browser: Firefox
@codebykat codebykat added [Block] Latest Comments Affects the Latest Comments Block [Type] Bug An existing feature does not function as intended labels Mar 9, 2019
@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Mar 11, 2019
@Jackie6
Copy link
Contributor

Jackie6 commented Mar 29, 2019

Hi @codebykat I cannot reproduce the bug. Has the bug been fixed?

@gziolo
Copy link
Member

gziolo commented Apr 10, 2019

Is it specific to the theme used maybe?

@gziolo gziolo added the Needs Dev Ready for, and needs developer efforts label Apr 10, 2019
@liloo2040
Copy link

liloo2040 commented Apr 24, 2019

Hi! I think I have found why it doesn't work.

Try to work with it your css file.

Just write .aligncenter{ text-align: center; }
or
.alignright{ text-align:right;}.

I hope it helps you!

@codebykat
Copy link
Contributor Author

This was on the Gutenberg Docker env, so it looks like the theme is Twenty Nineteen.

Just re-tested. Right align seems to be working now, but center still fails to center:

Screen Shot 2019-04-25 at 8 54 03 PM

Screen Shot 2019-04-25 at 8 53 58 PM

@codebykat codebykat changed the title Latest Comments block: Can't center or right-align Latest Comments block: Can't center align Apr 26, 2019
@codebykat
Copy link
Contributor Author

Oh, nevermind, I was just testing with the Latest Posts block (which might have a bug where it can't be aligned center)?

Latest Comments alignment seems to work now. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Comments Affects the Latest Comments Block Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants