Skip to content

fix: collapse AccordionContent child margins into panel padding#2483

Open
Devil1716 wants to merge 1 commit into
dequelabs:developfrom
Devil1716:fix/2482-accordion-content-margins
Open

fix: collapse AccordionContent child margins into panel padding#2483
Devil1716 wants to merge 1 commit into
dequelabs:developfrom
Devil1716:fix/2482-accordion-content-margins

Conversation

@Devil1716

Copy link
Copy Markdown

Summary

  • Zero out top margin on the first child and bottom margin on the last child of Accordion__panel
  • Prevents child <p> (and similar) margins from stacking on top of the panel's 16px padding

Closes #2482

Test plan

  • Open Accordion with <p> children inside AccordionContent
  • Confirm spacing from panel edge to text is ~16px (panel padding only), not padding + paragraph margin

Zero out first/last child vertical margins so paragraph margins do not stack on top of Accordion__panel padding.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Devil1716
Devil1716 requested a review from a team as a code owner July 18, 2026 07:04
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aws-amplify-us-east-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2483.d15792l1n26ww3.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AccordionContent: vertical padding causes too much spacing if children have top/bottom margin defined

2 participants