Site Editor: Try fixing document name position#45682
Closed
Conversation
|
|
|
Size Change: +42 B (0%) Total Size: 1.29 MB
ℹ️ View Unchanged
|
Contributor
|
I prefer the approach in #45683, what do you think? |
Member
Author
I did try that approach and a few variations of it (playing with the |
Member
Author
|
Closing in favour of #45683. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
This should correct the central alignment of the document title at the top of the Site Editor.
Why?
Closes #29673.
The central alignment of the document title element is slightly off and is currently worse at smaller resolutions. I believe this is partly due to the white space around the arrow icon SVG, and I don't think the width of the WordPress logo in the top left is fully taken into account in the centering calculation.
How?
This PR adds a left margin to the title label to match the white space on the right side of the arrow SVG, and it also sets a fixed width on the
.edit-site-header-edit-mode__startand.edit-site-header-edit-mode__endelements. The.edit-site-header-edit-mode__startelement takes the WordPress logo width into account, so this is included in the centering calculations.Testing Instructions
I tested this by measuring the left and right sides of the document title in the Site Editor with an on-screen ruler, to ensure they were equal. The widths should be tested at a range of screen resolutions.