Skip to content

Fixes Accordion block width issue when applying padding#71809

Merged
t-hamano merged 2 commits intoWordPress:trunkfrom
theminaldiwan:fix/accordion-block-width-issue
Sep 22, 2025
Merged

Fixes Accordion block width issue when applying padding#71809
t-hamano merged 2 commits intoWordPress:trunkfrom
theminaldiwan:fix/accordion-block-width-issue

Conversation

@theminaldiwan
Copy link
Contributor

What?

Closes #71803

Why?

When changes padding from accordion block settings, the width of block is not align with other blocks.

How?

When adding box-sizing: border-box styling to parent of this block .wp-block-accordion, then width is looking similar to other blocks.

Screenshots

Before

Screenshot 2025-09-22 at 1 53 10 PM

After

Screenshot 2025-09-22 at 1 52 06 PM

@github-actions
Copy link

github-actions bot commented Sep 22, 2025

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 props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @minaldiwan.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: minaldiwan.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: theminaldiwan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@theminaldiwan theminaldiwan force-pushed the fix/accordion-block-width-issue branch from 19abf71 to 37b2a88 Compare September 22, 2025 08:43
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Can you add a comment on why this style is required? For example:

.wp-block-avatar {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Block] Accordion Affects the Accordion Block labels Sep 22, 2025
@theminaldiwan
Copy link
Contributor Author

Thanks for the PR!

Can you add a comment on why this style is required? For example:

.wp-block-avatar {
// This block has customizable padding, border-box makes that more predictable.
box-sizing: border-box;

Done

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@t-hamano t-hamano merged commit e65c518 into WordPress:trunk Sep 22, 2025
68 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.8 milestone Sep 22, 2025
adamsilverstein pushed a commit to adamsilverstein/gutenberg that referenced this pull request Sep 22, 2025
)

* Fix Accordion block width issue

* added comment for css

---------

Unlinked contributors: minaldiwan.

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: theminaldiwan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Accordion Affects the Accordion Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accordion Block: 'box-sizing: border-box' should be applied

3 participants