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

Buttons block not really center aligned. #23010

Closed
paaljoachim opened this issue Jun 8, 2020 · 3 comments
Closed

Buttons block not really center aligned. #23010

paaljoachim opened this issue Jun 8, 2020 · 3 comments
Labels
[Block] Buttons Affects the Buttons Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@paaljoachim
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The Cover Block contains a new grid alignment option icon.
Adding a title. Parent Block grid icon is at center point.
Child block with the title is also center aligned.

Screen Shot 2020-06-08 at 23 27 01

Adding a Buttons Block which is also centered aligned the result looks like this:
Screen Shot 2020-06-08 at 23 29 59

Selecting title and button:
Screen Shot 2020-06-08 at 23 30 40

The buttons block is off center as can be seen above.

Describe the solution you'd like
I would like to have the button center aligned. So that for instance can be used in a Cover Block.

@paaljoachim paaljoachim added the [Block] Buttons Affects the Buttons Block label Jun 8, 2020
@jasmussen
Copy link
Contributor

Yep, this frustrates me too. I could swear there was a ticket for this already, but I can't find it.

What it boils down to is that the appender takes up space vertically, which offsets the centering. To further complicate things, this appender only shows up when the preceeding block is not a text block. Observe how a paragraph is perfectly centered:

Screenshot 2020-06-09 at 08 34 49

But a buttons block is not:

Screenshot 2020-06-09 at 08 35 01

At least we now hide the appender when the parent block isn't selected:

Screenshot 2020-06-09 at 08 36 18

But it would be nice both if we could clean up and simplify the heuristic for when the appender shows up (I think @ZebulanStanphill may have a ticket for this?) and find a solution for making the appender not take up space. Can it be floated and absolute positioned to take it out of the flow? Would that cause bad overlap? Worth exploring.

@paaljoachim
Copy link
Contributor Author

paaljoachim commented Jun 9, 2020

A Buttons Block label search and I found this issue:
Buttons Block: Centre aligned button isn't centre in the editor
#21805

I'll close this issue as a duplicate.

@ZebulanStanphill
Copy link
Member

@jasmussen I think the issue you're thinking of is #13571.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Buttons Affects the Buttons Block [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

3 participants