Skip to content

Commit

Permalink
Merge branch 'main' into 4286-hcm-apply-color-changes-on-hover-in-hig…
Browse files Browse the repository at this point in the history
…h-contrast-mode-for-search-input-post-closebutton-post-togglebutton-and-chip-components
  • Loading branch information
schaertim authored Dec 18, 2024
2 parents 5fd7dd3 + 912198c commit f71dd4f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-pots-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': patch
---

Added hint to not use active, disabled chips.
5 changes: 5 additions & 0 deletions .changeset/violet-geckos-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-components': patch
---

Added hover color to `post-accordion` in high contrast mode.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const meta: MetaComponent = {
},
active: {
name: 'Active',
description: 'If `true`, the chip is active.',
description:
'If `true`, the chip is active.<div className="mt-8 banner banner-info banner-sm">Disabling active chips can result in confusing or unexpected behavior and should be avoided.<br/>Please read our <a href="/?path=/docs/46da78e8-e83b-4ca1-aaf6-bbc662efef14--docs#disabled-state">disabled state accessibility guide</a>.</div>',
if: {
arg: 'type',
eq: 'filter',
Expand Down

0 comments on commit f71dd4f

Please sign in to comment.