From 9d38ef30e278582692fbf6d0c67786e4a0076239 Mon Sep 17 00:00:00 2001 From: Ahmed Alsinan Date: Tue, 9 Jul 2024 23:57:32 +0300 Subject: [PATCH] feat(accordion): support nested accordion Signed-off-by: Ahmed Alsinan --- .all-contributorsrc | 9 +++++++++ README.md | 1 + .../styles/scss/components/accordion/_accordion.scss | 10 ++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index b1ed1e6d5f27..635d298c502c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1569,6 +1569,15 @@ "contributions": [ "code" ] + }, + { + "login": "tekno0ryder", + "name": "Ahmed Alsinan", + "avatar_url": "https://avatars.githubusercontent.com/u/8721803?v=4", + "profile": "https://github.com/tekno0ryder", + "contributions": [ + "code" + ] } ], "commitConvention": "none" diff --git a/README.md b/README.md index 7ca95649f0b8..5a4fed85b935 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
nandininarayanofficial

💻
Andrea DG

💻
Luis

💻 +
Ahmed Alsinan

💻 diff --git a/packages/styles/scss/components/accordion/_accordion.scss b/packages/styles/scss/components/accordion/_accordion.scss index 666933905116..5ea63ae6d2ad 100644 --- a/packages/styles/scss/components/accordion/_accordion.scss +++ b/packages/styles/scss/components/accordion/_accordion.scss @@ -217,7 +217,7 @@ $content-padding: 0 0 0 $spacing-05 !default; .#{$prefix}--accordion__item--active { overflow: visible; - .#{$prefix}--accordion__wrapper { + > .#{$prefix}--accordion__wrapper { // Properties for when the accordion is open overflow: visible; max-block-size: fit-content; @@ -226,9 +226,11 @@ $content-padding: 0 0 0 $spacing-05 !default; padding-block-end: $spacing-06; } - .#{$prefix}--accordion__arrow { - fill: $icon-primary; - transform: rotate(-90deg) #{'/*rtl:ignore*/'}; + > .#{$prefix}--accordion__heading { + > .#{$prefix}--accordion__arrow { + fill: $icon-primary; + transform: rotate(-90deg) #{'/*rtl:ignore*/'}; + } } }