Query Pagination: Fix positioning of next link in editor when parent is selected#45651
Merged
andrewserong merged 1 commit intotrunkfrom Nov 9, 2022
Merged
Conversation
|
|
ajlende
approved these changes
Nov 9, 2022
Contributor
ajlende
left a comment
There was a problem hiding this comment.
This is working well for me!
|
Size Change: +21 B (0%) Total Size: 1.29 MB
ℹ️ View Unchanged
|
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 is a follow-up to #42764 which fixed the position of the Next link on the first page of the Query loop to ensure that it's right aligned when the space between content justification is used.
An issue with the CSS from that PR is that when the parent Query Pagination block is selected in the block editor, then the block appender is the last element in the DOM under the Query Pagination block, so the
:last-childrule does not wind up targeting the next link.In this change, if we swap the
:first-childrule to use a:last-of-typerule, it appears to fix the issue. Because the next link uses anatag and the block appender uses adivtag, the updated rule correctly targets the last link under the parent Query pagination block.Why?
Fix the display of the children of the Query pagination block when the block is selected in the editor.
How?
Update the rule the applies
margin-inline-start: autoto the Query Pagination Next block to use:last-of-typeinstead of:last-child.Testing Instructions
Screenshots or screencast