From ea329f28e02efd10b4fb3c67f24bc320110dbba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Sch=C3=A4r?= <59233938+schaertim@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:26:20 +0100 Subject: [PATCH 1/2] =?UTF-8?q?chore(styles):=20added=20hover=20color=20to?= =?UTF-8?q?=20=C2=B4post-accordion=C2=B4=20in=20HCM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/violet-geckos-shave.md | 5 +++++ .../post-accordion-item/post-accordion-item.scss | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .changeset/violet-geckos-shave.md diff --git a/.changeset/violet-geckos-shave.md b/.changeset/violet-geckos-shave.md new file mode 100644 index 0000000000..38a2f97c52 --- /dev/null +++ b/.changeset/violet-geckos-shave.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Added hover color to ´post-accordion´ in high contrast mode. diff --git a/packages/components/src/components/post-accordion-item/post-accordion-item.scss b/packages/components/src/components/post-accordion-item/post-accordion-item.scss index 0e4bc8249e..e5c7319221 100644 --- a/packages/components/src/components/post-accordion-item/post-accordion-item.scss +++ b/packages/components/src/components/post-accordion-item/post-accordion-item.scss @@ -21,6 +21,9 @@ tokens.$default-map: components.$post-accordion; } &:has(.accordion-button:hover)::after { border-color: tokens.get('accordion-hover-border'); + @include utility-mx.high-contrast-mode() { + border-color: Highlight; + } } } @@ -47,7 +50,6 @@ tokens.$default-map: components.$post-accordion; calc( tokens.get('accordion-header-padding-inline') + tokens.get('accordion-border-bottom-width') ); - transition: accordion.$accordion-button-transition; cursor: pointer; &::before { @@ -100,13 +102,7 @@ tokens.$default-map: components.$post-accordion; @include utility-mx.high-contrast-mode() { &:hover, &:focus-visible { - &:not(:disabled) { - outline: tokens.get('accordion-border-bottom-width') solid Highlight; - } - } - - &:disabled { - opacity: 1 !important; + color: Highlight; } } } From 6ee8ce6d69b432587fa16c870c746a5aa0a415e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Sch=C3=A4r?= <59233938+schaertim@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:43:48 +0100 Subject: [PATCH 2/2] Update .changeset/violet-geckos-shave.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alizé Debray <33580481+alizedebray@users.noreply.github.com> --- .changeset/violet-geckos-shave.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/violet-geckos-shave.md b/.changeset/violet-geckos-shave.md index 38a2f97c52..eccb818090 100644 --- a/.changeset/violet-geckos-shave.md +++ b/.changeset/violet-geckos-shave.md @@ -2,4 +2,4 @@ '@swisspost/design-system-components': patch --- -Added hover color to ´post-accordion´ in high contrast mode. +Added hover color to `post-accordion` in high contrast mode.