-
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
Comment pagination blocks: Add spacing support #43905
Conversation
Size Change: -334 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
This comment was marked as outdated.
This comment was marked as outdated.
@c4rl0sbr4v0 I consider this to be low priority, but do you remember why the spacing between the comments pagination inner blocks where handled with both margins and block gap? Could this spacing be handled with block gap only? |
@carolinan I guess there is no specific reason for using both margins and the gap if this last one was enough. It could be our lack of knowledge about theming in this case. Feel free to update, as you are quite more experienced in themes! Also, we can ping @MaggieCabrera or @mikachan as Theme experts too. |
Looking at the styles that are output for the comments pagination elements, it looks like we can just use block gap here 👍 |
Flaky tests detected in b21c3e8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5377524539
|
I can confirm that this is still blocked. The margins added through theme.json or global styles work in the site editor and block editor, but on the front they are overridden by the layout styles as described in this comment: #45107 (review)
|
When adding margin and padding to the comment pagination block via the global styles sidebar, I am now seeing the following: Site Editor, margin is not applied:
Front, no issues:
|
In classic themes that does not enable spacing settings, the following CSS is output on the front:
and
|
But this is the CSS output on the front in the same classic theme, Twenty Ten, when Gutenberg is deactivated.
|
I give up for today 😆 But I don't think the issues in the classic theme that does not have a theme.json are introduced by this PR. The loading order of the CSS is different when Gutenberg is active. |
Hi @carolinan ! I've been away on paternity leave for a few time. How can I help you here? |
@c4rl0sbr4v0 I am not sure. The remaining issue is the CSS specificity, so it is bigger than this single PR... The block styles are being overwritten, and the CSS is different depending on what the theme type is, classic or block. |
What?
Adds spacing block support to
Comments pagination, comments pagination next, previous and numbers.
Why?
So that users can adjust the spacing, and for consistency.
Related: #43243
How?
Adds spacing block support in block.json.
Testing Instructions
The testing steps are the same for the four blocks, test both individual blocks, global style settings, and theme.json style settings.
Continue to test the block's layout (spacing) settings in the global styles sidebar in the site editor.
Note that the comment pagination next/previous and numbers have the same names in the styles sidebar as the query pagination blocks. So if at first you fail, try the other.
Theme.json example code:
Screenshots or screencast