-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Title: Add padding support #43458
Query Title: Add padding support #43458
Conversation
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.
Thanks for updating this one @ndiego! I ran into the same issue as in the Post Title PR (#43457) where I think we might need to add in box-sizing: border-box
in order for the padding to be consistent with adjacent blocks that have padding, like the Group block:
There's an example in the Post Date block PR (#43406), but it looks like for Query Title, that there isn't yet a styles.scss
file. The block does output a wp-block-query-title
classname in the editor and when rendered on the server, so we should be able to use a similar change as in #43406, if that looks good to you?
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.
Another +1 for the box-sizing
suggestion.
Added this PR to the dimensions design tools tracking also.
I'll get |
@andrewserong added |
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.
Thanks for updating @ndiego!
✅ Padding is working as expected in the post editor now
✅ Padding is working as expected in the site editor and set in global styles
LGTM! ✨
Related:
What?
Add padding support to the Query Title block.
Why?
To create consistency across blocks. This also allows users to override padding applied to Query Title blocks when there is a background color.
How?
Added the relevant block support in block.json
Testing Instructions
Screenshots or screencast
(Note the padding visualizers are a bit wonky still in the Site Editor, but I don't think that should hold up this PR)