From 0742dae404d2e084641a03d2b236c89050a28928 Mon Sep 17 00:00:00 2001 From: Steven Kemp Date: Wed, 30 Nov 2022 17:04:04 -0500 Subject: [PATCH 1/2] fix(accordion): include margins during expand animation Closes #26381 --- core/src/components/accordion/accordion.scss | 8 ++++++++ .../accordion/test/standalone/index.html | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/core/src/components/accordion/accordion.scss b/core/src/components/accordion/accordion.scss index 1305913a929..e560c5de333 100644 --- a/core/src/components/accordion/accordion.scss +++ b/core/src/components/accordion/accordion.scss @@ -57,6 +57,14 @@ max-height: 0; } +/** + * Prevent margins of content-wrapper + * from collapsing, breaking the animation. + */ +:host(.accordion-expanding) #content-wrapper { + overflow: auto; +} + :host(.accordion-disabled) #header, :host(.accordion-readonly) #header, :host(.accordion-disabled) #content, diff --git a/core/src/components/accordion/test/standalone/index.html b/core/src/components/accordion/test/standalone/index.html index d01bed44c07..bb1c4a5e000 100644 --- a/core/src/components/accordion/test/standalone/index.html +++ b/core/src/components/accordion/test/standalone/index.html @@ -77,6 +77,26 @@

Item In Content

+ +
+

Margins In Content

+ + + + Accordion + + + Card Title + Card Subtitle + + + + Here's a small text description for the card content. Nothing more, nothing less. + + + + +
From 32d61fac9b33efa34fb7c53ca01a7a355fc8007e Mon Sep 17 00:00:00 2001 From: Steven Kemp Date: Fri, 9 Dec 2022 13:51:12 -0500 Subject: [PATCH 2/2] test(accordion): update breaking test for accordion with margin --- core/src/components/accordion/test/standalone/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/components/accordion/test/standalone/index.html b/core/src/components/accordion/test/standalone/index.html index bb1c4a5e000..50cf965424c 100644 --- a/core/src/components/accordion/test/standalone/index.html +++ b/core/src/components/accordion/test/standalone/index.html @@ -81,8 +81,8 @@

Item In Content

Margins In Content

- - + + Accordion