-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Query: Adjust the position of sticky search field in Patterns modal #62370
Conversation
Size Change: +60 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be backported? |
This issue isn't new to WP6.6, but I think it's a great fix, so let's backport it to WP6.6. |
…62370) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
…62370) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
…ordPress#62370) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
This was cherry-picked to the wp/6.6 branch. |
What?
This PR fixes a small gap at the top of the search bar in pattern modals in a query loop block.
Before
After
Why?
This gap is padding added to prevent focus outline cutoff in the Modal component. So even if we apply
top:0
to a sticky search bar, this gap remains.How?
At first, I thought it would be a simple solution to change the top position by 4px like this:
But this approach would cause the search bar to shift when scrolling:
f47bf9b6387034bb463ce4fd195560b1.mp4
Therefore, I tried the following approach:
top:0
and shift it up by 4px viatransform
-4px
to the bottom marginThis will make the padding above and below the search bar uniform at 16px, and there should be no gaps.
Testing Instructions