Skip to content

Commit

Permalink
chore:(components): header hcm
Browse files Browse the repository at this point in the history
  • Loading branch information
myrta2302 committed Dec 13, 2024
1 parent 8d4a5aa commit 23c7e3d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@use '@swisspost/design-system-styles/mixins/utilities';

post-closebutton button post-icon {
@include utilities.high-contrast-mode() {
color: LinkText !important;
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@use '@swisspost/design-system-styles/core' as post;
@use '@swisspost/design-system-styles/mixins/utilities';

:host {
display: inline-block;
width: fit-content;
@include utilities.high-contrast-mode() {
color: LinkText;
}
}

button {
Expand Down Expand Up @@ -34,6 +38,9 @@ a {
&[aria-current='page'] {
background-color: #050400;
color: #fff;
@include utilities.high-contrast-mode() {
background-color: SelectedItem;
}
}
}

Expand All @@ -45,6 +52,10 @@ a {

&[aria-current='true'],
&[aria-current='page'] {
@include utilities.high-contrast-mode() {
background-color: SelectedItem;
}

&::after {
content: '';
left: -2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ tokens.$default-map: components.$post-button;
@include utilities-mx.focus-style;
@include utilities-mx.not-disabled-hover() {
@include button-mx.button-variant-def('hover', 'tertiary');
@include utilities-mx.high-contrast-mode() {
color: LinkText;
}
}

post-icon {
height: var(--post-core-dimension-16);
width: var(--post-core-dimension-16);
}
@include utilities-mx.high-contrast-mode() {
color: LinkText;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
@use '@swisspost/design-system-styles/tokens/elements';
@use '@swisspost/design-system-styles/variables/animation';
@use '@swisspost/design-system-styles/components/header/mixins' as header-mx;
@use '@swisspost/design-system-styles/mixins/utilities';

$nav-height: var(--post-core-dimension-56);

post-mainnavigation {
// reset links and buttons
// reset links and buttons;
post-list-item {
> a {
text-decoration: none;
Expand All @@ -30,12 +31,18 @@ post-mainnavigation {

&:hover {
color: tokens.get('post-link-hover-fg', elements.$post-link);
@include utilities.high-contrast-mode() {
color: LinkText;
}
}

&:focus-visible {
border-radius: var(--post-core-dimension-4);
z-index: 1;
}
@include utilities.high-contrast-mode() {
color: LinkText;
}
}
}

Expand Down Expand Up @@ -68,7 +75,9 @@ post-mainnavigation {
font-size: var(--post-core-font-size-16);
border-block: 0 solid transparent;
border-block-end-color: currentColor;

@include utilities.high-contrast-mode() {
border-block-end-color: LinkText;
}
&:hover {
border-block-width: var(--post-core-dimension-2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
@use '@swisspost/design-system-styles/tokens/helpers';

:host {
@include utilities.high-contrast-mode() {
color: LinkText !important;
}
cursor: pointer;
outline-offset: tokens.get('focus-outline-offset', helpers.$post-focus) !important;
outline: tokens.get('focus-outline-color', helpers.$post-focus) none
tokens.get('focus-outline-width', helpers.$post-focus) !important;
tokens.get('focus-outline-width', helpers.$post-focus) !important;
}

:host(:focus-visible) {
Expand All @@ -17,14 +20,14 @@
}
}

:host([aria-pressed="true"]) {
::slotted([data-showwhen="untoggled"]) {
:host([aria-pressed='true']) {
::slotted([data-showwhen='untoggled']) {
display: none;
}
}

:host([aria-pressed="false"]) {
::slotted([data-showwhen="toggled"]) {
:host([aria-pressed='false']) {
::slotted([data-showwhen='toggled']) {
display: none;
}
}

0 comments on commit 23c7e3d

Please sign in to comment.